Documentation ¶
Index ¶
Constants ¶
View Source
const SERVER_UUID_HEADER = "immudb-uuid"
SERVER_UUID_HEADER ...
Variables ¶
View Source
var ErrNoServerUuid = fmt.Errorf( "!IMPORTANT WARNING: %s header is not published by the immudb server; "+ "this client MUST NOT be used to connect to different immudb servers!", SERVER_UUID_HEADER)
ErrNoServerUuid ...
Functions ¶
This section is empty.
Types ¶
type StateProvider ¶
type StateProvider interface {
CurrentState(ctx context.Context) (*schema.ImmutableState, error)
}
func NewStateProvider ¶
func NewStateProvider(client schema.ImmuServiceClient) StateProvider
type StateService ¶
type StateService interface { GetState(ctx context.Context, db string) (*schema.ImmutableState, error) SetState(db string, state *schema.ImmutableState) error CacheLock() error CacheUnlock() error }
StateService the root service interface
func NewStateService ¶
func NewStateService(cache cache.Cache, logger logger.Logger, stateProvider StateProvider, uuidProvider UUIDProvider) (StateService, error)
NewStateService ...
func NewStateServiceWithUUID ¶ added in v1.2.0
func NewStateServiceWithUUID(cache cache.Cache, logger logger.Logger, stateProvider StateProvider, serverUUID string) (StateService, error)
NewStateService ...
type UUIDProvider ¶
func NewUUIDProvider ¶
func NewUUIDProvider(client schema.ImmuServiceClient) UUIDProvider
Click to show internal directories.
Click to hide internal directories.