member

package
v0.0.0-...-f80ad84 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetImageLicense

func GetImageLicense(image *api.ImageInfo) string

Types

type Health

type Health struct {
	// Members is a map of members of the cluster.
	Members map[driver.ServerID]driver.ServerHealth
	// Errors is set when it is not possible to fetch a cluster info.
	Error error
}

Health describes a cluster health. In the fail-over or single mode fields members and error will be nil. In the cluster mode only one field should be set: error or members.

type PhaseExecutor

type PhaseExecutor interface {
	Execute(obj meta.Object, spec api.DeploymentSpec, group api.ServerGroup, m *api.MemberStatus, action api.Action, to api.MemberPhase) bool
}

func GetPhaseExecutor

func GetPhaseExecutor() PhaseExecutor

type State

type State struct {
	// NotReachableErr set to non-nil if a member is not reachable.
	NotReachableErr error
	// IsClusterHealthy describes if member is healthy in a cluster. It is relevant only in cluster mode.
	IsClusterHealthy bool
	// Version of this specific member.
	Version driver.VersionInfo
	// contains filtered or unexported fields
}

State describes a state of a member.

func (State) GetDatabaseClient

func (s State) GetDatabaseClient() (driver.Client, error)

GetDatabaseClient returns client to the database.

func (State) IsReachable

func (s State) IsReachable() bool

func (State) IsServing

func (s State) IsServing() bool

IsServing returns true when server can serve requests.

func (State) WrapLogger

func (s State) WrapLogger(event *zerolog.Event) *zerolog.Event

type StateInspector

type StateInspector interface {
	RefreshState(ctx context.Context, members api.DeploymentStatusMemberElements)

	// GetMemberClient returns member connection to an ArangoDB server.
	GetMemberClient(id string) (driver.Client, error)

	// GetMemberSyncClient returns member connection to an ArangoSync server.
	GetMemberSyncClient(id string) (client.API, error)

	MemberState(id string) (State, bool)

	// Health returns health of members and boolean value which describes if it was possible to fetch health.
	Health() (Health, bool)

	State() State

	Log(logger logging.Logger)
}

func NewStateInspector

func NewStateInspector(deployment reconciler.DeploymentGetter) StateInspector

NewStateInspector creates a new deployment inspector.

type StateInspectorGetter

type StateInspectorGetter interface {
	GetMembersState() StateInspector
}

Jump to

Keyboard shortcuts

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