instance

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: GPL-3.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSentryWriter

func NewSentryWriter(log *zap.Logger) sentryWriter

Types

type APIClusterInfoOutput added in v0.17.0

type APIClusterInfoOutput struct {
	ClusterVersion      string         `json:"clusterVersion" required:"true"`
	ClusterVersionShort string         `json:"clusterVersionShort" required:"true"`
	Instances           []InstanceInfo `json:"instances" required:"true"`
}

type APIInstanceInfo

type APIInstanceInfo struct {
	Version   string `json:"version" required:"true"`
	BuildHash string `json:"buildHash" required:"true"`

	Dirs *extconfig.ExtConfigDirs `json:"dirs" required:"true"`

	InstanceIdentifier string `json:"instanceIdentifier" required:"true"`
	InstanceIP         string `json:"instanceIP" 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 New

func New() *Instance

func (*Instance) APIClusterInfo added in v0.17.0

func (i *Instance) APIClusterInfo() usecase.Interactor

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) DispatchEvent

func (i *Instance) DispatchEvent(topic string, ev *roles.Event)

func (*Instance) ForRole

func (i *Instance) ForRole(roleId string, ctx context.Context) *RoleInstance

func (*Instance) Log

func (i *Instance) Log() *zap.Logger

func (*Instance) Role

func (i *Instance) Role(id string) roles.Role

func (*Instance) Start

func (i *Instance) Start()

func (*Instance) Stop

func (i *Instance) Stop()

type InstanceInfo

type InstanceInfo struct {
	Version    string   `json:"version" required:"true"`
	Roles      []string `json:"roles" required:"true"`
	Identifier string   `json:"identifier" required:"true"`
	IP         string   `json:"ip" required:"true"`
}

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) ExecuteHook added in v0.10.0

func (ri *RoleInstance) ExecuteHook(options roles.HookOptions, args ...interface{})

func (*RoleInstance) HookEnvironment added in v0.13.4

func (ri *RoleInstance) HookEnvironment(options roles.HookOptions) map[string]interface{}

func (*RoleInstance) KV

func (ri *RoleInstance) KV() *storage.Client

func (*RoleInstance) Log

func (ri *RoleInstance) Log() *zap.Logger

func (*RoleInstance) Migrator added in v0.16.0

func (ri *RoleInstance) Migrator() roles.RoleMigrator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL