Documentation ¶
Index ¶
- func NewSentryWriter(log *zap.Logger) sentryWriter
- type APIInstanceInfo
- type APIInstancesOutput
- type APIRoleRestartInput
- type APIRoleRestartOutput
- type ClusterInfo
- type Instance
- func (i *Instance) APIClusterRoleRestart() usecase.Interactor
- func (i *Instance) APIInstanceInfo() usecase.Interactor
- func (i *Instance) APIInstances() usecase.Interactor
- func (i *Instance) DispatchEvent(topic string, ev *roles.Event)
- func (i *Instance) ForRole(roleId string, ctx context.Context) *RoleInstance
- func (i *Instance) Log() *zap.Logger
- func (i *Instance) Role(id string) roles.Role
- func (i *Instance) Start()
- func (i *Instance) Stop()
- type InstanceInfo
- type RoleContext
- type RoleInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSentryWriter ¶
Types ¶
type APIInstanceInfo ¶
type APIInstanceInfo struct { Version string `json:"version" required:"true"` BuildHash string `json:"buildHash" required:"true"` Dirs *extconfig.ExtConfigDirs `json:"dirs" required:"true"` CurrentInstanceIdentifier string `json:"currentInstanceIdentifier" required:"true"` CurrentInstanceIP string `json:"currentInstanceIP" required:"true"` }
type APIInstancesOutput ¶
type APIInstancesOutput struct {
Instances []InstanceInfo `json:"instances" required:"true"`
}
type APIRoleRestartInput ¶ added in v0.3.18
type APIRoleRestartInput struct {
ID string `json:"roleId"`
}
type APIRoleRestartOutput ¶ added in v0.3.18
type APIRoleRestartOutput struct{}
type ClusterInfo ¶
type ClusterInfo struct {
Setup bool `json:"setup"`
}
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
func (*Instance) APIClusterRoleRestart ¶ added in v0.3.18
func (i *Instance) APIClusterRoleRestart() usecase.Interactor
func (*Instance) APIInstanceInfo ¶
func (i *Instance) APIInstanceInfo() usecase.Interactor
func (*Instance) APIInstances ¶
func (i *Instance) APIInstances() usecase.Interactor
type InstanceInfo ¶
type RoleContext ¶
type RoleContext struct { Role roles.Role RoleInstance *RoleInstance ContextCancelFunc context.CancelFunc }
type RoleInstance ¶
type RoleInstance struct {
// contains filtered or unexported fields
}
func (*RoleInstance) AddEventListener ¶
func (ri *RoleInstance) AddEventListener(topic string, handler roles.EventHandler)
func (*RoleInstance) Context ¶ added in v0.4.9
func (ri *RoleInstance) Context() context.Context
func (*RoleInstance) DispatchEvent ¶
func (ri *RoleInstance) DispatchEvent(topic string, ev *roles.Event)
func (*RoleInstance) KV ¶
func (ri *RoleInstance) KV() *storage.Client
func (*RoleInstance) Log ¶
func (ri *RoleInstance) Log() *zap.Logger
Source Files ¶
Click to show internal directories.
Click to hide internal directories.