-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
you know how state sucks, right? sometimes though you're just running in docker and kubes or whatever weird mickey mouse container shipping and deployment service your employer is running and you need some way to store state. not, like, a whole lot, right, but you just want to keep track of SOME things that you don't want to/can't store on a local disk because what even is a local disk in the year of our lord 2024?
import (
"sux"
)
function getState (token string, secret string) *sux.Sux {
// you're going to get an unmarshaled json here, or an error
state, err := sux.OneBlob(token, secret)
if err == nil {
return state
}
else {
// uh oh
}
}
function setState(s sux.Sux, state string) error {
// state is going to be that unmarshaled json above, let me take care of the marshaling for you, nobody wants to do that
err := s.OneBlobUpdate(state)
return err
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request