Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶ added in v0.1.1
type Option func(s *StateStore)
func WithCapacity ¶ added in v0.1.1
WithCapacity configures the store to automatically expire states after ttl If left unconfigured, a default of 5 minutes will be used
func WithLogger ¶ added in v0.1.1
WithLogger configures the store with the given logger If left unconfigured, logging will be disabled
type StateStore ¶ added in v0.1.1
type StateStore struct {
// contains filtered or unexported fields
}
StateStore is a StateStore using memory
func NewStateStore ¶ added in v0.1.1
func NewStateStore(opts ...Option) *StateStore
func (*StateStore) GetState ¶ added in v0.1.1
func (m *StateStore) GetState(key string) (*header.MachineInfo, error)
GetState returns the info assocated with key. If key is not in the store, the returned info will be nil
func (*StateStore) SetState ¶ added in v0.1.1
func (m *StateStore) SetState(key string, info *header.MachineInfo) error
SetState associates key with info in the store
Click to show internal directories.
Click to hide internal directories.