Documentation
¶
Index ¶
- type LightningMonkeyETCDStorageDriver
- func (sd *LightningMonkeyETCDStorageDriver) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
- func (sd *LightningMonkeyETCDStorageDriver) GetRequestTimeoutDuration() time.Duration
- func (sd *LightningMonkeyETCDStorageDriver) Initialize(settings map[string]string) error
- func (sd *LightningMonkeyETCDStorageDriver) NewLease() clientv3.Lease
- func (sd *LightningMonkeyETCDStorageDriver) Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
- func (sd *LightningMonkeyETCDStorageDriver) Txn(ctx context.Context) clientv3.Txn
- func (sd *LightningMonkeyETCDStorageDriver) Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan
- type LightningMonkeyStorageDriver
- type StorageDriver
- type StorageDriverFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LightningMonkeyETCDStorageDriver ¶
type LightningMonkeyETCDStorageDriver struct {
// contains filtered or unexported fields
}
func (*LightningMonkeyETCDStorageDriver) Get ¶
func (sd *LightningMonkeyETCDStorageDriver) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
func (*LightningMonkeyETCDStorageDriver) GetRequestTimeoutDuration ¶
func (sd *LightningMonkeyETCDStorageDriver) GetRequestTimeoutDuration() time.Duration
func (*LightningMonkeyETCDStorageDriver) Initialize ¶
func (sd *LightningMonkeyETCDStorageDriver) Initialize(settings map[string]string) error
Required Fields: + ENDPOINTS
func (*LightningMonkeyETCDStorageDriver) NewLease ¶
func (sd *LightningMonkeyETCDStorageDriver) NewLease() clientv3.Lease
func (*LightningMonkeyETCDStorageDriver) Put ¶
func (sd *LightningMonkeyETCDStorageDriver) Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
type LightningMonkeyStorageDriver ¶
type LightningMonkeyStorageDriver interface {
Initialize(settings map[string]string) error
GetRequestTimeoutDuration() time.Duration
Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan
Txn(ctx context.Context) clientv3.Txn
Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
NewLease() clientv3.Lease
}
type StorageDriver ¶
type StorageDriver interface {
Initialize(args map[string]string) error
GetCluster(clusterId string) (*entities.Cluster, error)
SaveCluster(cluster *entities.Cluster, certsMap *certs.GeneratedCertsMap) error
GetCertificatesByClusterId(clusterId string) (entities.CertificateCollection, error)
GetCertificatesByClusterIdAndName(clusterId string, name string) (*entities.Certificate, error)
GetAllClusters() ([]*entities.Cluster, error)
GetAllAgentsByClusterId(clusterId string) ([]*entities.Agent, error)
GetAgentByMetadataId(metadataId string) (*entities.Agent, error)
SaveAgent(agent *entities.Agent) error
SaveCertificateToCluster(cluster *entities.Cluster, certsMap *certs.GeneratedCertsMap) error
UpdateCluster(cluster *entities.Cluster) error
UpdateAgentStatus(agent *entities.Agent) error
BatchUpdateAgentStatus(agents []*entities.Agent) error
}
type StorageDriverFactory ¶
type StorageDriverFactory struct {
}
func (*StorageDriverFactory) NewStorageDriver ¶
func (sdf *StorageDriverFactory) NewStorageDriver(t string) (LightningMonkeyStorageDriver, error)
Click to show internal directories.
Click to hide internal directories.