Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltDBConfig ¶
type BoltDBConfig struct {
File string
}
BoltDBConfig configuration of the BoltDB backend
type Errors ¶
type Errors int
Errors persistence errors
const ( // ErrInvalidArgs invalid arguments provided ErrInvalidArgs Errors = iota // ErrUnknownProvider if provider is unknown ErrUnknownProvider // ErrAlreadyExists object already exists ErrAlreadyExists // ErrNotInitialized persistence provider not initialized yet ErrNotInitialized // ErrNotFound object not found ErrNotFound // ErrNotOpen storage is not open ErrNotOpen )
type Provider ¶
type Provider interface { Sessions() (Sessions, error) Subscriptions() (Subscriptions, error) Retained() (Retained, error) System() (System, error) Shutdown() error }
Provider interface implemented by different backends
type ProviderConfig ¶
type ProviderConfig interface{}
ProviderConfig interface implemented by every backend
type Retained ¶
type Retained interface { // Store persist retained message Store([][]byte) error // Load load retained messages Load() ([][]byte, error) // Wipe retained storage Wipe() error }
Retained provider for load/store retained messages
type Session ¶
type Session interface {
Get([]byte) (*SessionState, error)
}
Session persisted state of the session
type SessionState ¶
SessionState persisted session state
type Sessions ¶
type Sessions interface { Load(func([]byte, *SessionState)) error Get([]byte) (*SessionState, error) PutOutMessage([]byte, []byte) error Store([]byte, *SessionState) error Delete([]byte) error Wipe() error }
Sessions interface allows operating with sessions inside backend
type Subscriptions ¶
type Subscriptions interface { Store([]byte, []byte) error Load(func([]byte, []byte) error) error Delete([]byte) error Wipe() error }
Subscriptions interface within session
type System ¶
type System interface { GetInfo() (*SystemState, error) SetInfo(*SystemState) error }
System persistence state of the system configuration
type SystemState ¶
SystemState system configuration
Click to show internal directories.
Click to hide internal directories.