Documentation
¶
Index ¶
- Constants
- func StartPingingRedis(ctx context.Context, interval time.Duration, client redis.Cmdable, ...)
- func VerifyConnection(ctx context.Context, client redis.Cmdable, timeout time.Duration) error
- type Accounts
- func (r *Accounts) Create(ctx context.Context, username string) (service.Account, error)
- func (r *Accounts) Find(ctx context.Context, username string) (service.Account, error)
- func (r *Accounts) HealthCheck() service.HealthCheck
- func (r *Accounts) Revoke(ctx context.Context, shareCode service.ShareCode) error
- func (r *Accounts) Share(ctx context.Context, account service.Account) (service.ShareCode, error)
- func (r *Accounts) Shared(ctx context.Context, shareCode service.ShareCode) (service.Account, error)
- type ClientMutator
- type ClientMutators
- type ClientProvider
- type Clients
- type Devices
- func (r *Devices) AddDevice(ctx context.Context, account service.Account, id service.DeviceID, ...) (service.Device, error)
- func (r *Devices) DeleteDevice(ctx context.Context, account service.Account, id service.DeviceID) error
- func (r *Devices) GetDevice(ctx context.Context, account service.Account, id service.DeviceID) (service.Device, error)
- func (r *Devices) GetDevices(ctx context.Context, account service.Account) (map[service.DeviceID]service.Device, error)
- func (r *Devices) HealthCheck() service.HealthCheck
- type MetadataProvider
- type Module
- type Modules
- func (r *Modules) Delete(ctx context.Context, key string) error
- func (r *Modules) DeleteByPattern(ctx context.Context, pattern string) error
- func (r *Modules) Get(ctx context.Context, name string) (service.Module, error)
- func (r *Modules) HealthCheck() service.HealthCheck
- func (r *Modules) Set(ctx context.Context, name string, module service.Module) error
Constants ¶
View Source
const ( AccountKeySpace = "octi:accounts" )
View Source
const ( EnvRedisAddr = "REDIS_ADDR" EnvRedisUsername = "REDIS_USERNAME" EnvRedisPassword = "REDIS_PASSWORD" DefaultIntervalSeconds = 5 DefaultTimeoutSeconds = 5 NoExpiry = time.Duration(-1) )
View Source
const DeviceKeySpace = "octi:devices"
View Source
const MetadataKeySpace = "octi:metadata"
Variables ¶
This section is empty.
Functions ¶
func StartPingingRedis ¶
Types ¶
type Accounts ¶
type Accounts struct {
Client redis.Cmdable
}
func (*Accounts) HealthCheck ¶
func (r *Accounts) HealthCheck() service.HealthCheck
type ClientMutator ¶
type ClientMutator func(client goredis.UniversalClient) goredis.UniversalClient
type ClientMutators ¶
type ClientMutators map[string]ClientMutator
type ClientProvider ¶
type ClientProvider func(config *config.Config) goredis.UniversalClient
type Clients ¶
func NewClientsWithRegularPing ¶
func NewClientsWithRegularPing( ctx context.Context, config *config.Config, provider ClientProvider, mutators ClientMutators, ) (Clients, error)
type Devices ¶
type Devices struct {
Client redis.Cmdable
}
func (*Devices) DeleteDevice ¶
func (*Devices) GetDevices ¶
func (*Devices) HealthCheck ¶
func (r *Devices) HealthCheck() service.HealthCheck
type MetadataProvider ¶
type MetadataProvider struct {
Client redis.Cmdable
}
func (*MetadataProvider) Get ¶
func (r *MetadataProvider) Get(ctx context.Context, id service.MetadataID) (service.Metadata, error)
func (*MetadataProvider) HealthCheck ¶
func (r *MetadataProvider) HealthCheck() service.HealthCheck
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func ModuleFromBytes ¶
type Modules ¶
func (*Modules) DeleteByPattern ¶
func (*Modules) HealthCheck ¶
func (r *Modules) HealthCheck() service.HealthCheck
Source Files
¶
Click to show internal directories.
Click to hide internal directories.