Documentation
¶
Index ¶
- Constants
- func InstanceMonitorResourceIdentifier(instanceID string) resource.Identifier
- func Provide(i *do.Injector)
- func RegisterResourceTypes(registry *resource.Registry)
- func ServiceInstanceMonitorResourceIdentifier(serviceInstanceID string) resource.Identifier
- 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) TypeDependencies() []resource.Type
- 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) CreateServiceInstanceMonitor(ctx context.Context, databaseID, serviceInstanceID string) error
- func (s *Service) DeleteInstanceMonitor(ctx context.Context, instanceID string) error
- func (s *Service) DeleteServiceInstanceMonitor(ctx context.Context, serviceInstanceID string) error
- func (s *Service) HasInstanceMonitor(instanceID string) bool
- func (s *Service) HasServiceInstanceMonitor(serviceInstanceID string) bool
- func (s *Service) Shutdown() error
- func (s *Service) Start(ctx context.Context) error
- type ServiceInstanceMonitor
- type ServiceInstanceMonitorResource
- func (m *ServiceInstanceMonitorResource) Create(ctx context.Context, rc *resource.Context) error
- func (m *ServiceInstanceMonitorResource) Delete(ctx context.Context, rc *resource.Context) error
- func (m *ServiceInstanceMonitorResource) Dependencies() []resource.Identifier
- func (m *ServiceInstanceMonitorResource) DiffIgnore() []string
- func (m *ServiceInstanceMonitorResource) Executor() resource.Executor
- func (m *ServiceInstanceMonitorResource) Identifier() resource.Identifier
- func (m *ServiceInstanceMonitorResource) Refresh(ctx context.Context, rc *resource.Context) error
- func (m *ServiceInstanceMonitorResource) ResourceVersion() string
- func (m *ServiceInstanceMonitorResource) TypeDependencies() []resource.Type
- func (m *ServiceInstanceMonitorResource) Update(ctx context.Context, rc *resource.Context) error
- type ServiceInstanceMonitorStore
- func (s *ServiceInstanceMonitorStore) DeleteByHostID(hostID string) storage.DeleteOp
- func (s *ServiceInstanceMonitorStore) DeleteByKey(hostID, serviceInstanceID string) storage.DeleteOp
- func (s *ServiceInstanceMonitorStore) GetAllByHostID(hostID string) storage.GetMultipleOp[*StoredServiceInstanceMonitor]
- func (s *ServiceInstanceMonitorStore) GetByKey(hostID, serviceInstanceID string) storage.GetOp[*StoredServiceInstanceMonitor]
- func (s *ServiceInstanceMonitorStore) HostPrefix(hostID string) string
- func (s *ServiceInstanceMonitorStore) Key(hostID, serviceInstanceID string) string
- func (s *ServiceInstanceMonitorStore) Prefix() string
- func (s *ServiceInstanceMonitorStore) Put(item *StoredServiceInstanceMonitor) storage.PutOp[*StoredServiceInstanceMonitor]
- type Store
- type StoredInstanceMonitor
- type StoredServiceInstanceMonitor
Constants ¶
View Source
const ResourceTypeInstanceMonitorResource resource.Type = "monitor.instance"
View Source
const ResourceTypeServiceInstanceMonitorResource resource.Type = "monitor.service_instance"
Variables ¶
This section is empty.
Functions ¶
func InstanceMonitorResourceIdentifier ¶
func InstanceMonitorResourceIdentifier(instanceID string) resource.Identifier
func RegisterResourceTypes ¶
func ServiceInstanceMonitorResourceIdentifier ¶ added in v0.7.0
func ServiceInstanceMonitorResourceIdentifier(serviceInstanceID string) resource.Identifier
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( 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
func (*InstanceMonitorResource) TypeDependencies ¶ added in v0.7.0
func (m *InstanceMonitorResource) TypeDependencies() []resource.Type
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) CreateServiceInstanceMonitor ¶ added in v0.7.0
func (*Service) DeleteInstanceMonitor ¶
func (*Service) DeleteServiceInstanceMonitor ¶ added in v0.7.0
func (*Service) HasInstanceMonitor ¶
func (*Service) HasServiceInstanceMonitor ¶ added in v0.7.0
type ServiceInstanceMonitor ¶ added in v0.7.0
type ServiceInstanceMonitor struct {
// contains filtered or unexported fields
}
func NewServiceInstanceMonitor ¶ added in v0.7.0
func NewServiceInstanceMonitor( orch database.Orchestrator, dbSvc *database.Service, logger zerolog.Logger, databaseID string, serviceInstanceID string, hostID string, ) *ServiceInstanceMonitor
func (*ServiceInstanceMonitor) Start ¶ added in v0.7.0
func (m *ServiceInstanceMonitor) Start(ctx context.Context)
func (*ServiceInstanceMonitor) Stop ¶ added in v0.7.0
func (m *ServiceInstanceMonitor) Stop()
type ServiceInstanceMonitorResource ¶ added in v0.7.0
type ServiceInstanceMonitorResource struct {
DatabaseID string `json:"database_id"`
ServiceInstanceID string `json:"service_instance_id"`
HostID string `json:"host_id"`
}
func (*ServiceInstanceMonitorResource) Dependencies ¶ added in v0.7.0
func (m *ServiceInstanceMonitorResource) Dependencies() []resource.Identifier
func (*ServiceInstanceMonitorResource) DiffIgnore ¶ added in v0.7.0
func (m *ServiceInstanceMonitorResource) DiffIgnore() []string
func (*ServiceInstanceMonitorResource) Executor ¶ added in v0.7.0
func (m *ServiceInstanceMonitorResource) Executor() resource.Executor
func (*ServiceInstanceMonitorResource) Identifier ¶ added in v0.7.0
func (m *ServiceInstanceMonitorResource) Identifier() resource.Identifier
func (*ServiceInstanceMonitorResource) ResourceVersion ¶ added in v0.7.0
func (m *ServiceInstanceMonitorResource) ResourceVersion() string
func (*ServiceInstanceMonitorResource) TypeDependencies ¶ added in v0.7.0
func (m *ServiceInstanceMonitorResource) TypeDependencies() []resource.Type
type ServiceInstanceMonitorStore ¶ added in v0.7.0
type ServiceInstanceMonitorStore struct {
// contains filtered or unexported fields
}
func NewServiceInstanceMonitorStore ¶ added in v0.7.0
func NewServiceInstanceMonitorStore(client *clientv3.Client, root string) *ServiceInstanceMonitorStore
func (*ServiceInstanceMonitorStore) DeleteByHostID ¶ added in v0.7.0
func (s *ServiceInstanceMonitorStore) DeleteByHostID(hostID string) storage.DeleteOp
func (*ServiceInstanceMonitorStore) DeleteByKey ¶ added in v0.7.0
func (s *ServiceInstanceMonitorStore) DeleteByKey(hostID, serviceInstanceID string) storage.DeleteOp
func (*ServiceInstanceMonitorStore) GetAllByHostID ¶ added in v0.7.0
func (s *ServiceInstanceMonitorStore) GetAllByHostID(hostID string) storage.GetMultipleOp[*StoredServiceInstanceMonitor]
func (*ServiceInstanceMonitorStore) GetByKey ¶ added in v0.7.0
func (s *ServiceInstanceMonitorStore) GetByKey(hostID, serviceInstanceID string) storage.GetOp[*StoredServiceInstanceMonitor]
func (*ServiceInstanceMonitorStore) HostPrefix ¶ added in v0.7.0
func (s *ServiceInstanceMonitorStore) HostPrefix(hostID string) string
func (*ServiceInstanceMonitorStore) Key ¶ added in v0.7.0
func (s *ServiceInstanceMonitorStore) Key(hostID, serviceInstanceID string) string
func (*ServiceInstanceMonitorStore) Prefix ¶ added in v0.7.0
func (s *ServiceInstanceMonitorStore) Prefix() string
func (*ServiceInstanceMonitorStore) Put ¶ added in v0.7.0
func (s *ServiceInstanceMonitorStore) Put(item *StoredServiceInstanceMonitor) storage.PutOp[*StoredServiceInstanceMonitor]
type Store ¶
type Store struct {
InstanceMonitor *InstanceMonitorStore
ServiceInstanceMonitor *ServiceInstanceMonitorStore
// contains filtered or unexported fields
}
type StoredInstanceMonitor ¶
type StoredServiceInstanceMonitor ¶ added in v0.7.0
type StoredServiceInstanceMonitor struct {
storage.StoredValue
HostID string `json:"host_id"`
DatabaseID string `json:"database_id"`
ServiceInstanceID string `json:"service_instance_id"`
}
Click to show internal directories.
Click to hide internal directories.