Documentation
¶
Index ¶
- Constants
- func InstanceMonitorResourceIdentifier(instanceID string) resource.Identifier
- func Provide(i *do.Injector)
- func RegisterResourceTypes(registry *resource.Registry)
- type Check
- type HostMonitor
- type InstanceMonitor
- type InstanceMonitorResource
- func (m *InstanceMonitorResource) Create(ctx context.Context, rc *resource.Context) error
- func (m *InstanceMonitorResource) Delete(ctx context.Context, rc *resource.Context) error
- func (m *InstanceMonitorResource) Dependencies() []resource.Identifier
- func (m *InstanceMonitorResource) DiffIgnore() []string
- func (m *InstanceMonitorResource) Executor() resource.Executor
- func (m *InstanceMonitorResource) Identifier() resource.Identifier
- func (m *InstanceMonitorResource) Refresh(ctx context.Context, rc *resource.Context) error
- func (m *InstanceMonitorResource) ResourceVersion() string
- func (m *InstanceMonitorResource) Update(ctx context.Context, rc *resource.Context) error
- type InstanceMonitorStore
- func (s *InstanceMonitorStore) DeleteByHostID(hostID string) storage.DeleteOp
- func (s *InstanceMonitorStore) DeleteByKey(hostID, instanceID string) storage.DeleteOp
- func (s *InstanceMonitorStore) GetAllByHostID(hostID string) storage.GetMultipleOp[*StoredInstanceMonitor]
- func (s *InstanceMonitorStore) GetByKey(hostID, instanceID string) storage.GetOp[*StoredInstanceMonitor]
- func (s *InstanceMonitorStore) HostPrefix(hostID string) string
- func (s *InstanceMonitorStore) Key(hostID, instanceID string) string
- func (s *InstanceMonitorStore) Prefix() string
- func (s *InstanceMonitorStore) Put(item *StoredInstanceMonitor) storage.PutOp[*StoredInstanceMonitor]
- type Monitor
- type Service
- func (s *Service) CreateInstanceMonitor(ctx context.Context, databaseID, instanceID, dbName string) error
- func (s *Service) DeleteInstanceMonitor(ctx context.Context, instanceID string) error
- func (s *Service) HasInstanceMonitor(instanceID string) bool
- func (s *Service) Shutdown() error
- func (s *Service) Start(ctx context.Context) error
- type Store
- type StoredInstanceMonitor
Constants ¶
View Source
const ResourceTypeInstanceMonitorResource resource.Type = "monitor.instance"
Variables ¶
This section is empty.
Functions ¶
func InstanceMonitorResourceIdentifier ¶
func InstanceMonitorResourceIdentifier(instanceID string) resource.Identifier
func RegisterResourceTypes ¶
Types ¶
type HostMonitor ¶
type HostMonitor struct {
// contains filtered or unexported fields
}
func NewHostMonitor ¶
func NewHostMonitor( logger zerolog.Logger, svc *host.Service, ) *HostMonitor
func (*HostMonitor) Start ¶
func (m *HostMonitor) Start(ctx context.Context)
func (*HostMonitor) Stop ¶
func (m *HostMonitor) Stop()
type InstanceMonitor ¶
type InstanceMonitor struct {
// contains filtered or unexported fields
}
func NewInstanceMonitor ¶
func NewInstanceMonitor( orch database.Orchestrator, dbSvc *database.Service, certSvc *certificates.Service, logger zerolog.Logger, databaseID string, instanceID string, dbName string, ) *InstanceMonitor
func (*InstanceMonitor) Start ¶
func (m *InstanceMonitor) Start(ctx context.Context)
func (*InstanceMonitor) Stop ¶
func (m *InstanceMonitor) Stop()
type InstanceMonitorResource ¶
type InstanceMonitorResource struct {
DatabaseID string `json:"database_id"`
InstanceID string `json:"instance_id"`
DatabaseName string `json:"db_name"`
HostID string `json:"host_id"`
}
func (*InstanceMonitorResource) Dependencies ¶
func (m *InstanceMonitorResource) Dependencies() []resource.Identifier
func (*InstanceMonitorResource) DiffIgnore ¶
func (m *InstanceMonitorResource) DiffIgnore() []string
func (*InstanceMonitorResource) Executor ¶
func (m *InstanceMonitorResource) Executor() resource.Executor
func (*InstanceMonitorResource) Identifier ¶
func (m *InstanceMonitorResource) Identifier() resource.Identifier
func (*InstanceMonitorResource) ResourceVersion ¶
func (m *InstanceMonitorResource) ResourceVersion() string
type InstanceMonitorStore ¶
type InstanceMonitorStore struct {
// contains filtered or unexported fields
}
func NewInstanceMonitorStore ¶
func NewInstanceMonitorStore(client *clientv3.Client, root string) *InstanceMonitorStore
func (*InstanceMonitorStore) DeleteByHostID ¶
func (s *InstanceMonitorStore) DeleteByHostID(hostID string) storage.DeleteOp
func (*InstanceMonitorStore) DeleteByKey ¶
func (s *InstanceMonitorStore) DeleteByKey(hostID, instanceID string) storage.DeleteOp
func (*InstanceMonitorStore) GetAllByHostID ¶
func (s *InstanceMonitorStore) GetAllByHostID(hostID string) storage.GetMultipleOp[*StoredInstanceMonitor]
func (*InstanceMonitorStore) GetByKey ¶
func (s *InstanceMonitorStore) GetByKey(hostID, instanceID string) storage.GetOp[*StoredInstanceMonitor]
func (*InstanceMonitorStore) HostPrefix ¶
func (s *InstanceMonitorStore) HostPrefix(hostID string) string
func (*InstanceMonitorStore) Key ¶
func (s *InstanceMonitorStore) Key(hostID, instanceID string) string
func (*InstanceMonitorStore) Prefix ¶
func (s *InstanceMonitorStore) Prefix() string
func (*InstanceMonitorStore) Put ¶
func (s *InstanceMonitorStore) Put(item *StoredInstanceMonitor) storage.PutOp[*StoredInstanceMonitor]
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CreateInstanceMonitor ¶
func (*Service) DeleteInstanceMonitor ¶
func (*Service) HasInstanceMonitor ¶
type Store ¶
type Store struct {
InstanceMonitor *InstanceMonitorStore
// contains filtered or unexported fields
}
type StoredInstanceMonitor ¶
Click to show internal directories.
Click to hide internal directories.