Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterStateStorage ¶
func RegisterStateStorage(name config.StateStorageType, provider Provider) bool
RegisterStateStorage registers a config.StateStorageType to a Provider implementation which creates the Storage when requested
Types ¶
type Offset ¶
type Offset struct { Timestamp time.Time `json:"timestamp"` Snapshot bool `json:"snapshot"` SnapshotName *string `json:"snapshot_name,omitempty"` SnapshotOffset int `json:"snapshot_offset"` LSN pgtypes.LSN `json:"lsn"` }
func (*Offset) MarshalBinary ¶
func (*Offset) UnmarshalBinary ¶
type StateEncoderFunc ¶
func (StateEncoderFunc) MarshalBinary ¶
func (sef StateEncoderFunc) MarshalBinary() (data []byte, err error)
type Storage ¶
type Storage interface { Start() error Stop() error Save() error Load() error Get() (map[string]*Offset, error) Set(key string, value *Offset) error StateEncoder(name string, encoder encoding.BinaryMarshaler) error StateDecoder(name string, decoder encoding.BinaryUnmarshaler) (present bool, err error) EncodedState(name string) (encodedState []byte, present bool) SetEncodedState(name string, encodedState []byte) }
func NewStateStorage ¶
NewStateStorage instantiates a new instance of the requested Storage when available, otherwise returns an error.
Click to show internal directories.
Click to hide internal directories.