msgbus

package
v3.0.0-rc45 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package msgbus defines the Opensvc messages

HOWTO Add a new msgX:

- daemon/msgbus/messages.go Add the msgX type - daemon/msgbus/messages.go Add the kindToT["msgX"] mapping - daemon/msgbus/messages.go Add the `Kind() string` implementation - daemon/msgbus/messages.go Add the `Key() string` implementation to activate the diff event renderer - core/commoncmd/text/node-events/flag/filter Document msgX

msgX is waitable (om node events --filter msgX --wait)

- daemon/msgbus/event_cache.go add a event cache feeder

msgX is exposed in the daemon data:

- daemon/msgbus/xxx.go create the ClusterData.onMsgX function - daemon/msgbus/main.go update the ClusterData.ApplyMessage function

msgX must be sent to peers (to patch):

- daemon/daemondata/data.go update the startSubscriptions function - daemon/daemondata/data.go update the localEventMustBeForwarded function

msgX is received from peer (from patch):

- daemon/daemondata/apply_patch.go update the setCacheAndPublish function:

"full" is received from peer, which contains a msgX data

- daemon/daemondata/apply_full.go update the applyNodeData function

on peer node delete, we may need to publish msgX delete events

- daemon/daemondata/node_data.go update data.dropPeer function

Note:

  • drop peer node must also publish InstanceConfigDeleted, ... => InstanceConfigUpdated needs publish InstanceConfigDeleted
  • drop peer node may publish empty DaemonXXXUpdated to reset daemon subsystem state

Index

Constants

This section is empty.

Variables

View Source
var (
	// ExtractableEvents Extractable events for event cache
	// Try to keep this in sync with the list of events in the msgbus package that
	// can be extracted.
	//
	// Keep ordered with NodeDataUpdated first, then with other events in the natural
	// emission order.
	ExtractableEvents = [24]any{
		&NodeDataUpdated{},
		&NodePoolStatusUpdated{},
		&NodeAlive{},
		&NodeStale{},

		&NodeConfigUpdated{},
		&NodeMonitorUpdated{},
		&NodeOsPathsUpdated{},
		&NodeStatsUpdated{},
		&NodeStatusUpdated{},

		&ClusterConfigUpdated{},
		&ClusterStatusUpdated{},

		&DaemonDataUpdated{},
		&DaemonHeartbeatUpdated{},
		&DaemonCollectorUpdated{},
		&DaemonDnsUpdated{},
		&DaemonListenerUpdated{},
		&DaemonRunnerImonUpdated{},
		&DaemonSchedulerUpdated{},

		&HeartbeatAlive{},
		&HeartbeatStale{},

		&InstanceConfigUpdated{},
		&InstanceMonitorUpdated{},
		&InstanceStatusUpdated{},

		&ObjectStatusUpdated{},
	}
)

Functions

func DropPendingMsg

func DropPendingMsg(c <-chan any, duration time.Duration)

func EventToMessage

func EventToMessage(ev event.Event) (pubsub.Messager, error)

EventToMessage converts event.Event message as pubsub.Messager

func KindToT

func KindToT(kind string) (any, error)

Types

type ArbitratorError

type ArbitratorError struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
	Name       string `json:"name" yaml:"name"`
	ErrS       string `json:"error" yaml:"error"`
}

ArbitratorError message is published when an arbitrator error is detected

func (*ArbitratorError) Kind

func (e *ArbitratorError) Kind() string

type AuditStart

type AuditStart struct {
	pubsub.Msg `yaml:",inline"`
	Q          chan plog.LogMessage `json:"-" yaml:"-"`
	Subsystems []string             `json:"subsystems" yaml:"subsystems"`
}

func (*AuditStart) Kind

func (e *AuditStart) Kind() string

type AuditStop

type AuditStop struct {
	pubsub.Msg `yaml:",inline"`
	Q          chan plog.LogMessage `json:"-" yaml:"-"`
	Subsystems []string             `json:"subsystems" yaml:"subsystems"`
}

func (*AuditStop) Kind

func (e *AuditStop) Kind() string

type ClientSubscribed

type ClientSubscribed struct {
	pubsub.Msg `yaml:",inline"`
	Time       time.Time `json:"at" yaml:"at"`
	Name       string    `json:"name" yaml:"name"`
}

func (*ClientSubscribed) Kind

func (e *ClientSubscribed) Kind() string

type ClientUnsubscribed

type ClientUnsubscribed struct {
	pubsub.Msg `yaml:",inline"`
	Time       time.Time `json:"at" yaml:"at"`
	Name       string    `json:"name" yaml:"name"`
}

func (*ClientUnsubscribed) Kind

func (e *ClientUnsubscribed) Kind() string

type ClusterConfigUpdated

type ClusterConfigUpdated struct {
	pubsub.Msg     `yaml:",inline"`
	Node           string         `json:"node"`
	Value          cluster.Config `json:"cluster_config"`
	NodesAdded     []string       `json:"nodes_added"`
	NodesRemoved   []string       `json:"nodes_removed"`
	NetworkChanged []string       `json:"network_changed"`
}

func (*ClusterConfigUpdated) Key

func (e *ClusterConfigUpdated) Key() string

func (*ClusterConfigUpdated) Kind

func (e *ClusterConfigUpdated) Kind() string

type ClusterData

type ClusterData struct {
	*clusterdump.Data
	// contains filtered or unexported fields
}

ClusterData struct holds cluster data that can be updated with msg

func NewClusterData

func NewClusterData(cd *clusterdump.Data) *ClusterData

func (*ClusterData) ApplyMessage

func (data *ClusterData) ApplyMessage(m pubsub.Messager)

func (*ClusterData) ExtractEvents

func (data *ClusterData) ExtractEvents(m any, labels pubsub.Labels) ([]any, error)

func (*ClusterData) OnObjectStatusDeleted

func (data *ClusterData) OnObjectStatusDeleted(m *ObjectStatusDeleted)

OnObjectStatusDeleted delete .cluster.object.<path>

func (*ClusterData) OnObjectStatusUpdated

func (data *ClusterData) OnObjectStatusUpdated(m *ObjectStatusUpdated)

OnObjectStatusUpdated updates .cluster.object.<path>

type ClusterDataSnapshotRequest

type ClusterDataSnapshotRequest struct {
	pubsub.Msg `yaml:",inline"`
	ReplyC     chan *clusterdump.Data `json:"-" yaml:"-"`
}

ClusterDataSnapshotRequest asks the daemondata manager for its cluster data, answered on ReplyC once the manager processed the messages published before this request: the bus queues the messages of a subscription in their publication order.

A daemon events stream asks for its replay this way, after it subscribed, so a message published before the stream subscribed is in the replay even when the manager had not processed it yet.

It is not an event kind: an events stream does not forward it.

func (*ClusterDataSnapshotRequest) Kind

type ClusterStatusUpdated

type ClusterStatusUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string             `json:"node" yaml:"node"`
	Value      clusterdump.Status `json:"cluster_status" yaml:"cluster_status"`
}

func (*ClusterStatusUpdated) Kind

func (e *ClusterStatusUpdated) Kind() string

type ConfigFileRemoved

type ConfigFileRemoved struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	File       string      `json:"file" yaml:"file"`
}

ConfigFileRemoved is emitted by a fs watcher when a .conf file is removed in etc. The imon goroutine listens to this event and updates the daemondata, which in turns emits a InstanceConfigDeleted{} event.

func (*ConfigFileRemoved) Kind

func (e *ConfigFileRemoved) Kind() string

type ConfigFileUpdated

type ConfigFileUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	File       string      `json:"file" yaml:"file"`
}

ConfigFileUpdated is emitted by a fs watcher when a .conf file is updated or created in etc. The imon goroutine listens to this event and updates the daemondata, which in turns emits a InstanceConfigUpdated{} event.

func (*ConfigFileUpdated) Kind

func (e *ConfigFileUpdated) Kind() string

type DaemonCollectorUpdated

type DaemonCollectorUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`

	Value daemonsubsystem.Collector `json:"collector" yaml:"collector"`
}

func (*DaemonCollectorUpdated) Key

func (e *DaemonCollectorUpdated) Key() string

func (*DaemonCollectorUpdated) Kind

func (e *DaemonCollectorUpdated) Kind() string

type DaemonCtl

type DaemonCtl struct {
	pubsub.Msg `yaml:",inline"`
	Component  string `json:"component" yaml:"component"`
	Action     string `json:"action" yaml:"action"`
}

func (*DaemonCtl) Kind

func (e *DaemonCtl) Kind() string

type DaemonDataUpdated

type DaemonDataUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`

	Value daemonsubsystem.Daemondata `json:"daemondata" yaml:"daemondata"`
}

func (*DaemonDataUpdated) Kind

func (e *DaemonDataUpdated) Kind() string

type DaemonDnsUpdated

type DaemonDnsUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`

	Value daemonsubsystem.Dns `json:"dns" yaml:"dns"`
}

func (*DaemonDnsUpdated) Key

func (e *DaemonDnsUpdated) Key() string

func (*DaemonDnsUpdated) Kind

func (e *DaemonDnsUpdated) Kind() string

type DaemonHeartbeatUpdated

type DaemonHeartbeatUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`

	Value daemonsubsystem.Heartbeat `json:"heartbeat" yaml:"heartbeat"`
}

func (*DaemonHeartbeatUpdated) Key

func (e *DaemonHeartbeatUpdated) Key() string

func (*DaemonHeartbeatUpdated) Kind

func (e *DaemonHeartbeatUpdated) Kind() string

type DaemonListenerUpdated

type DaemonListenerUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string                   `json:"node" yaml:"node"`
	Value      daemonsubsystem.Listener `json:"listener" yaml:"listener"`
}

func (*DaemonListenerUpdated) Key

func (e *DaemonListenerUpdated) Key() string

func (*DaemonListenerUpdated) Kind

func (e *DaemonListenerUpdated) Kind() string

type DaemonRunnerImonUpdated

type DaemonRunnerImonUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`

	Value daemonsubsystem.RunnerImon `json:"runner_imon" yaml:"runner_imon"`
}

func (*DaemonRunnerImonUpdated) Key

func (*DaemonRunnerImonUpdated) Kind

func (e *DaemonRunnerImonUpdated) Kind() string

type DaemonSchedulerUpdated

type DaemonSchedulerUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`

	Value daemonsubsystem.Scheduler `json:"scheduler" yaml:"scheduler"`
}

func (*DaemonSchedulerUpdated) Key

func (e *DaemonSchedulerUpdated) Key() string

func (*DaemonSchedulerUpdated) Kind

func (e *DaemonSchedulerUpdated) Kind() string

type DaemonStatusUpdated

type DaemonStatusUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
	Version    string `json:"version" yaml:"version"`
	Status     string `json:"status" yaml:"status"`
}

DaemonStatusUpdated message informs about main daemon status

func (*DaemonStatusUpdated) Key

func (e *DaemonStatusUpdated) Key() string

func (*DaemonStatusUpdated) Kind

func (e *DaemonStatusUpdated) Kind() string

type DrbdResourceUpdated

type DrbdResourceUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
	Res        string `json:"res" yaml:"res"`
}

DrbdResourceUpdated is published when the state of a drbd resource changed on the node: a role, a disk or peer disk state, a connection, a replication state, as a peer connects or a resync ends.

func (*DrbdResourceUpdated) Key

func (e *DrbdResourceUpdated) Key() string

func (*DrbdResourceUpdated) Kind

func (e *DrbdResourceUpdated) Kind() string

type EnterOverloadPeriod

type EnterOverloadPeriod struct {
	pubsub.Msg `yaml:",inline"`
}

func (*EnterOverloadPeriod) Kind

func (e *EnterOverloadPeriod) Kind() string

type Exec

type Exec struct {
	pubsub.Msg `yaml:",inline"`
	Command    string `json:"command" yaml:"command"`
	// Node is the nodename that will call exec
	Node string `json:"node" yaml:"node"`
	// Origin describes the exec caller: example: imon, nmon, scheduler...
	Origin string `json:"origin" yaml:"origin"`
	// RID is the resource the exec is of, when it is of one.
	RID string `json:"rid" yaml:"rid"`
	// StartedAt is when the publisher started the process, measured by
	// the publisher. A subscriber stamping its own arrival time instead
	// would be recording when the bus delivered the news, which is not
	// when the exec began and does not agree with its duration.
	StartedAt time.Time   `json:"started_at" yaml:"started_at"`
	Title     string      `json:"title" yaml:"title"`
	SessionID xsession.ID `json:"session_id" yaml:"session_id"`
	ExecID    xsession.ID `json:"exec_id" yaml:"exec_id"`
	// OrchestrationID is set when the exec is a step of an
	// orchestration, so the execs of one can be found together.
	OrchestrationID xsession.ID `json:"orchestration_id" yaml:"orchestration_id"`
}

Exec message describes an exec call

func (*Exec) Kind

func (e *Exec) Kind() string

type ExecFailed

type ExecFailed struct {
	pubsub.Msg `yaml:",inline"`
	Command    string        `json:"command" yaml:"command"`
	Duration   time.Duration `json:"duration" yaml:"duration"`
	ErrS       string        `json:"error" yaml:"error"`
	// ExitCode is what the process exited with, 128 + the signal number
	// when a signal ended it, and -1 when it never ran at all.
	ExitCode int `json:"exit_code" yaml:"exit_code"`
	// Node is the nodename that called exec
	Node string `json:"node" yaml:"node"`
	// Origin describes the exec caller: example: imon, nmon, scheduler...
	Origin    string      `json:"origin" yaml:"origin"`
	Title     string      `json:"title" yaml:"title"`
	SessionID xsession.ID `json:"session_id" yaml:"session_id"`
	ExecID    xsession.ID `json:"exec_id" yaml:"exec_id"`
	// OrchestrationID is set when the exec is a step of an
	// orchestration, so the sessions of one can be found together.
	OrchestrationID xsession.ID `json:"orchestration_id" yaml:"orchestration_id"`
}

ExecFailed message describes failed exec call

func (*ExecFailed) Kind

func (e *ExecFailed) Kind() string

type ExecSuccess

type ExecSuccess struct {
	pubsub.Msg `yaml:",inline"`
	Command    string        `json:"command" yaml:"command"`
	Duration   time.Duration `json:"duration" yaml:"duration"`
	// ExitCode is what the process exited with. Usually zero, but a
	// command given WithIgnoredExitCodes succeeds with others.
	ExitCode int `json:"exit_code" yaml:"exit_code"`
	// Node is the nodename that called exec
	Node string `json:"node" yaml:"node"`
	// Origin describes the exec caller: example: imon, nmon, scheduler...
	Origin    string      `json:"origin" yaml:"origin"`
	Title     string      `json:"title" yaml:"title"`
	SessionID xsession.ID `json:"session_id" yaml:"session_id"`
	ExecID    xsession.ID `json:"exec_id" yaml:"exec_id"`
	// OrchestrationID is set when the exec is a step of an
	// orchestration, so the sessions of one can be found together.
	OrchestrationID xsession.ID `json:"orchestration_id" yaml:"orchestration_id"`
}

ExecSuccess message describes successfully exec call

func (*ExecSuccess) Kind

func (e *ExecSuccess) Kind() string

type Exit

type Exit struct {
	Path naming.Path `json:"path" yaml:"path"`
	File string      `json:"file" yaml:"file"`
}

func (*Exit) Kind

func (e *Exit) Kind() string

type FSMounted

type FSMounted struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
	MountPoint string `json:"mount_point" yaml:"mount_point"`
	FSType     string `json:"fs_type" yaml:"fs_type"`
	Source     string `json:"source" yaml:"source"`
	Options    string `json:"options" yaml:"options"`
}

FSMounted is published when a filesystem is mounted

func (*FSMounted) Key

func (e *FSMounted) Key() string

func (*FSMounted) Kind

func (e *FSMounted) Kind() string

type FSRemounted

type FSRemounted struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
	MountPoint string `json:"mount_point" yaml:"mount_point"`
	FSType     string `json:"fs_type" yaml:"fs_type"`
	Source     string `json:"source" yaml:"source"`
	Options    string `json:"options" yaml:"options"`
}

FSRemounted is published when a filesystem is remounted

func (*FSRemounted) Key

func (e *FSRemounted) Key() string

func (*FSRemounted) Kind

func (e *FSRemounted) Kind() string

type FSUmounted

type FSUmounted struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
	MountPoint string `json:"mount_point" yaml:"mount_point"`
	FSType     string `json:"fs_type" yaml:"fs_type"`
	Source     string `json:"source" yaml:"source"`
	Options    string `json:"options" yaml:"options"`
}

FSUmounted is published when a filesystem is unmounted

func (*FSUmounted) Key

func (e *FSUmounted) Key() string

func (*FSUmounted) Kind

func (e *FSUmounted) Kind() string

type ForgetPeer

type ForgetPeer struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
}

func (*ForgetPeer) Kind

func (e *ForgetPeer) Kind() string

type HeartbeatAlive

type HeartbeatAlive struct {
	pubsub.Msg `yaml:",inline"`
	Nodename   string    `json:"node" yaml:"node"`
	HbID       string    `json:"hb_id" yaml:"hb_id"`
	Time       time.Time `json:"at" yaml:"at"`
}

func (*HeartbeatAlive) Kind

func (e *HeartbeatAlive) Kind() string

type HeartbeatMessageTypeUpdated

type HeartbeatMessageTypeUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string   `json:"node" yaml:"node"`
	From       string   `json:"old_type" yaml:"old_type"`
	To         string   `json:"new_type" yaml:"new_type"`
	Nodes      []string `json:"nodes" yaml:"nodes"`

	// JoinedNodes are nodes with hb message type patch
	JoinedNodes []string `json:"joined_nodes" yaml:"joined_nodes"`

	// InstalledGens are the current installed node gens
	InstalledGens node.Gen `json:"installed_gens" yaml:"installed_gens"`
}

func (*HeartbeatMessageTypeUpdated) Key

func (*HeartbeatMessageTypeUpdated) Kind

type HeartbeatRotateError

type HeartbeatRotateError struct {
	pubsub.Msg `yaml:",inline"`
	ID         uuid.UUID `json:"id" yaml:"id"`
	Reason     string    `json:"reason" yaml:"reason"`
}

func (*HeartbeatRotateError) Kind

func (e *HeartbeatRotateError) Kind() string

type HeartbeatRotateRequest

type HeartbeatRotateRequest struct {
	pubsub.Msg `yaml:",inline"`
	ID         uuid.UUID `json:"id" yaml:"id"`
}

func (*HeartbeatRotateRequest) Kind

func (e *HeartbeatRotateRequest) Kind() string

type HeartbeatRotateSuccess

type HeartbeatRotateSuccess struct {
	pubsub.Msg `yaml:",inline"`
	ID         uuid.UUID `json:"id" yaml:"id"`
}

func (*HeartbeatRotateSuccess) Kind

func (e *HeartbeatRotateSuccess) Kind() string

type HeartbeatSecretUpdated

type HeartbeatSecretUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Nodename   string          `json:"nodename" yaml:"nodename"`
	Value      hbsecret.Secret `json:"hb_secret" yaml:"hb_secret"`
}

func (*HeartbeatSecretUpdated) Kind

func (e *HeartbeatSecretUpdated) Kind() string

type HeartbeatStale

type HeartbeatStale struct {
	pubsub.Msg `yaml:",inline"`
	Nodename   string    `json:"node" yaml:"node"`
	HbID       string    `json:"hb_id" yaml:"hb_id"`
	Time       time.Time `json:"at" yaml:"at"`
}

func (*HeartbeatStale) Kind

func (e *HeartbeatStale) Kind() string

type InstanceActionPending

type InstanceActionPending struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path           `json:"path" yaml:"path"`
	Node       string                `json:"node" yaml:"node"`
	Phase      collector.ActionPhase `json:"phase" yaml:"phase"`
	Action     collector.Action      `json:"action" yaml:"action"`

	// UUID is the collector uuid of the begin, when the end is announced
	// after the begin was acknowledged.
	UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
}

InstanceActionPending is emitted by the node an instance action ran on, for the begin or the end of the action the collector did not acknowledge yet. The node emits it again until the collector speaker acknowledges it with InstanceActionSent.

It carries no log line: the speaker reads them from the journal of Node when it sends the end.

func (*InstanceActionPending) Key

func (e *InstanceActionPending) Key() string

func (*InstanceActionPending) Kind

func (e *InstanceActionPending) Kind() string

type InstanceActionSent

type InstanceActionSent struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path           `json:"path" yaml:"path"`
	Node       string                `json:"node" yaml:"node"`
	ExecID     uuid.UUID             `json:"exec_id" yaml:"exec_id"`
	Phase      collector.ActionPhase `json:"phase" yaml:"phase"`

	// UUID is the collector uuid of the begin.
	UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
}

InstanceActionSent is emitted by the collector speaker when the collector accepted, or refused for good, the begin or the end of an instance action. Node is the node the action ran on, which drops its pending files of the action.

func (*InstanceActionSent) Key

func (e *InstanceActionSent) Key() string

func (*InstanceActionSent) Kind

func (e *InstanceActionSent) Kind() string

type InstanceConfigDeleted

type InstanceConfigDeleted struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	Node       string      `json:"node" yaml:"node"`
}

func (*InstanceConfigDeleted) KeysToDelete

func (e *InstanceConfigDeleted) KeysToDelete() []string

func (*InstanceConfigDeleted) Kind

func (e *InstanceConfigDeleted) Kind() string

type InstanceConfigDeleting

type InstanceConfigDeleting struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	Node       string      `json:"node" yaml:"node"`
}

InstanceConfigDeleting event is pushed during imon orchestration deleting step.

func (*InstanceConfigDeleting) Kind

func (e *InstanceConfigDeleting) Kind() string

type InstanceConfigFor

type InstanceConfigFor struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	Node       string      `json:"node" yaml:"node"`
	// Orchestrate is the config orchestrate value. it may be used by peers
	// just after installation of fetched instance config file
	Orchestrate string `json:"orchestrate" yaml:"orchestrate"`
	// Scope is the list of nodes that have to fetch this config
	Scope []string `json:"scope" yaml:"scope"`
	// UpdatedAt is the config file time stamp
	UpdatedAt time.Time `json:"updated_at" yaml:"updated_at"`
}

InstanceConfigFor message is published by a node during analyse of instance config file that is scoped for foreign nodes (peers).

func (*InstanceConfigFor) Kind

func (e *InstanceConfigFor) Kind() string

type InstanceConfigManagerDone

type InstanceConfigManagerDone struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	File       string      `json:"file" yaml:"file"`
}

func (*InstanceConfigManagerDone) Kind

type InstanceConfigUpdated

type InstanceConfigUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path     `json:"path" yaml:"path"`
	Node       string          `json:"node" yaml:"node"`
	Value      instance.Config `json:"instance_config" yaml:"instance_config"`
}

func (*InstanceConfigUpdated) Key

func (e *InstanceConfigUpdated) Key() string

func (*InstanceConfigUpdated) Kind

func (e *InstanceConfigUpdated) Kind() string

type InstanceFrozenFileRemoved

type InstanceFrozenFileRemoved struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	File       string      `json:"file" yaml:"file"`
	At         time.Time   `json:"at" yaml:"at"`
}

InstanceFrozenFileRemoved is emitted by a fs watcher or iman when an instance frozen file is removed.

func (*InstanceFrozenFileRemoved) Kind

type InstanceFrozenFileUpdated

type InstanceFrozenFileUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	File       string      `json:"file" yaml:"file"`
	At         time.Time   `json:"at" yaml:"at"`

	// Scope is the scope of the freeze the flag records.
	Scope freeze.Scope `json:"scope,omitempty" yaml:"scope,omitempty"`
}

InstanceFrozenFileUpdated is emitted by a fs watcher, or imon when an instance frozen file is updated or created.

func (*InstanceFrozenFileUpdated) Kind

type InstanceMonitorAction

type InstanceMonitorAction struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path            `json:"path" yaml:"path"`
	Node       string                 `json:"node" yaml:"node"`
	Action     instance.MonitorAction `json:"action" yaml:"action"`
	RID        string                 `json:"rid" yaml:"rid"`
}

func (*InstanceMonitorAction) Kind

func (e *InstanceMonitorAction) Kind() string

type InstanceMonitorDeleted

type InstanceMonitorDeleted struct {
	pubsub.Msg       `yaml:",inline"`
	Path             naming.Path             `json:"path" yaml:"path"`
	Node             string                  `json:"node" yaml:"node"`
	OrchestrationEnd *ObjectOrchestrationEnd `json:"orchestration_end" yaml:"orchestration_end"`
}

func (*InstanceMonitorDeleted) KeysToDelete

func (e *InstanceMonitorDeleted) KeysToDelete() []string

func (*InstanceMonitorDeleted) Kind

func (e *InstanceMonitorDeleted) Kind() string

type InstanceMonitorUpdated

type InstanceMonitorUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path      `json:"path" yaml:"path"`
	Node       string           `json:"node" yaml:"node"`
	Value      instance.Monitor `json:"instance_monitor" yaml:"instance_monitor"`
}

func (*InstanceMonitorUpdated) Key

func (e *InstanceMonitorUpdated) Key() string

func (*InstanceMonitorUpdated) Kind

func (e *InstanceMonitorUpdated) Kind() string

type InstanceResourceInfoUpdated

type InstanceResourceInfoUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	Node       string      `json:"node" yaml:"node"`
	Checksum   string      `json:"checksum" yaml:"checksum"`
	UpdatedAt  time.Time   `json:"updated_at" yaml:"updated_at"`
}

InstanceResourceInfoUpdated is emitted when a node refreshed the resource info cache of one of its instances. It is a signal only: the key-values are not carried, the collector speaker fetches them from Node with the GetInstanceResourceInfo api when it is ready to report them.

func (*InstanceResourceInfoUpdated) Key

func (*InstanceResourceInfoUpdated) Kind

type InstanceStateFileUpdated

type InstanceStateFileUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	Node       string      `json:"node" yaml:"node"`
	File       string      `json:"file" yaml:"file"`
}

InstanceStateFileUpdated is emitted by the api when a peer wrote a state file of a local instance, as the source of a sync writes the last sync record of a peer it synced. The status of the instance read the file, and is outdated.

func (*InstanceStateFileUpdated) Kind

func (e *InstanceStateFileUpdated) Kind() string

type InstanceStatusDeleted

type InstanceStatusDeleted struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	Node       string      `json:"node" yaml:"node"`
	PeerDropAt time.Time   `json:"peer_drop_at"`
}

func (*InstanceStatusDeleted) KeysToDelete

func (e *InstanceStatusDeleted) KeysToDelete() []string

func (*InstanceStatusDeleted) Kind

func (e *InstanceStatusDeleted) Kind() string

type InstanceStatusPost

type InstanceStatusPost struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path     `json:"path" yaml:"path"`
	Node       string          `json:"node" yaml:"node"`
	Value      instance.Status `json:"instance_status" yaml:"instance_status"`
}

func (*InstanceStatusPost) Kind

func (e *InstanceStatusPost) Kind() string

type InstanceStatusUpdated

type InstanceStatusUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path     `json:"path" yaml:"path"`
	Node       string          `json:"node" yaml:"node"`
	Value      instance.Status `json:"instance_status" yaml:"instance_status"`
}

func (*InstanceStatusUpdated) Key

func (e *InstanceStatusUpdated) Key() string

func (*InstanceStatusUpdated) Kind

func (e *InstanceStatusUpdated) Kind() string

type InstanceStoppedFileRemoved

type InstanceStoppedFileRemoved struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	File       string      `json:"file" yaml:"file"`
	At         time.Time   `json:"at" yaml:"at"`
}

InstanceStoppedFileRemoved is emitted by imon when the flag saying the instance was stopped on purpose is lowered.

func (*InstanceStoppedFileRemoved) Kind

type InstanceStoppedFileUpdated

type InstanceStoppedFileUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	File       string      `json:"file" yaml:"file"`
	At         time.Time   `json:"at" yaml:"at"`
}

InstanceStoppedFileUpdated is emitted by imon when the flag saying the instance was stopped on purpose is raised.

func (*InstanceStoppedFileUpdated) Kind

type JoinError

type JoinError struct {
	pubsub.Msg `yaml:",inline"`
	// CandidateNode is the candidate node that can't be added to cluster config nodes
	CandidateNode string `json:"candidate_node" yaml:"candidate_node"`
	Reason        string `json:"reason" yaml:"reason"`
}

func (*JoinError) Kind

func (e *JoinError) Kind() string

type JoinIgnored

type JoinIgnored struct {
	pubsub.Msg `yaml:",inline"`
	// CandidateNode is a candidate node that is already present in cluster config nodes
	CandidateNode string `json:"candidate_node" yaml:"candidate_node"`
}

func (*JoinIgnored) Kind

func (e *JoinIgnored) Kind() string

type JoinRequest

type JoinRequest struct {
	pubsub.Msg `yaml:",inline"`
	// CandidateNode is a candidate node to add to cluster config nodes
	CandidateNode string `json:"candidate_node" yaml:"candidate_node"`
}

func (*JoinRequest) Kind

func (e *JoinRequest) Kind() string

type JoinSuccess

type JoinSuccess struct {
	pubsub.Msg `yaml:",inline"`
	// AddedNode is a node that has been successfully added to the cluster config nodes
	// after join request or sysadmin cluster config nodes update.
	AddedNode string `json:"added_node" yaml:"added_node"`
}

func (*JoinSuccess) Kind

func (e *JoinSuccess) Kind() string

type Keyer

type Keyer interface {
	Key() string
}

type LeaveError

type LeaveError struct {
	pubsub.Msg `yaml:",inline"`
	// CandidateNode is a candidate node that can't be removed from cluster config nodes
	CandidateNode string `json:"candidate_node" yaml:"candidate_node"`
	Reason        string
}

func (*LeaveError) Kind

func (e *LeaveError) Kind() string

type LeaveIgnored

type LeaveIgnored struct {
	pubsub.Msg `yaml:",inline"`
	// CandidateNode is a candidate node that is not a cluster config node
	CandidateNode string `json:"candidate_node" yaml:"candidate_node"`
}

func (*LeaveIgnored) Kind

func (e *LeaveIgnored) Kind() string

type LeaveOverloadPeriod

type LeaveOverloadPeriod struct {
	pubsub.Msg `yaml:",inline"`
}

func (*LeaveOverloadPeriod) Kind

func (e *LeaveOverloadPeriod) Kind() string

type LeaveRequest

type LeaveRequest struct {
	pubsub.Msg `yaml:",inline"`
	// CandidateNode is a node to remove to cluster config nodes
	CandidateNode string `json:"candidate_node" yaml:"candidate_node"`
}

func (*LeaveRequest) Kind

func (e *LeaveRequest) Kind() string

type LeaveSuccess

type LeaveSuccess struct {
	pubsub.Msg `yaml:",inline"`
	// RemovedNode is the successfully removed node from cluster config nodes
	RemovedNode string `json:"removed_node" yaml:"removed_node"`
}

func (*LeaveSuccess) Kind

func (e *LeaveSuccess) Kind() string

type Log

type Log struct {
	pubsub.Msg `yaml:",inline"`
	Message    string `json:"message" yaml:"message"`
	Level      string `json:"level" yaml:"level"`
}

Log is a log message.

Usage example: labels := []pubsub.Label{{"subsystem", "imon"}, {"path", p.String()}} pubsubBus.Pub(&msgbus.Log{Message: "orchestrate", Level: "debug"}, labels...)

func (*Log) Kind

func (e *Log) Kind() string

type NetIPAddrAdded

type NetIPAddrAdded struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
	LinkIndex  int    `json:"link_index" yaml:"link_index"`
	LinkName   string `json:"link_name" yaml:"link_name"`
	Address    string `json:"address" yaml:"address"`
}

NetIPAddrAdded is published when an IP address is added to a link

func (*NetIPAddrAdded) Key

func (e *NetIPAddrAdded) Key() string

func (*NetIPAddrAdded) Kind

func (e *NetIPAddrAdded) Kind() string

type NetIPAddrDeleted

type NetIPAddrDeleted struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
	LinkIndex  int    `json:"link_index" yaml:"link_index"`
	LinkName   string `json:"link_name" yaml:"link_name"`
	Address    string `json:"address" yaml:"address"`
}

NetIPAddrDeleted is published when an IP address is deleted from a link

func (*NetIPAddrDeleted) Key

func (e *NetIPAddrDeleted) Key() string

func (*NetIPAddrDeleted) Kind

func (e *NetIPAddrDeleted) Kind() string

type NetLinkDown

type NetLinkDown struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
	LinkIndex  int    `json:"link_index" yaml:"link_index"`
	LinkName   string `json:"link_name" yaml:"link_name"`
}

NetLinkDown is published when a network link goes down

func (*NetLinkDown) Key

func (e *NetLinkDown) Key() string

func (*NetLinkDown) Kind

func (e *NetLinkDown) Kind() string

type NetLinkUp

type NetLinkUp struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
	LinkIndex  int    `json:"link_index" yaml:"link_index"`
	LinkName   string `json:"link_name" yaml:"link_name"`
}

NetLinkUp is published when a network link goes up

func (*NetLinkUp) Key

func (e *NetLinkUp) Key() string

func (*NetLinkUp) Kind

func (e *NetLinkUp) Kind() string

type NodeAlive

type NodeAlive struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
}

func (*NodeAlive) Kind

func (e *NodeAlive) Kind() string

type NodeConfigUpdated

type NodeConfigUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string      `json:"node" yaml:"node"`
	Value      node.Config `json:"node_config" yaml:"node_config"`
}

func (*NodeConfigUpdated) Key

func (e *NodeConfigUpdated) Key() string

func (*NodeConfigUpdated) Kind

func (e *NodeConfigUpdated) Kind() string

type NodeDataUpdated

type NodeDataUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string    `json:"node" yaml:"node"`
	Value      node.Node `json:"node_data" yaml:"node_data"`
}

func (*NodeDataUpdated) Key

func (e *NodeDataUpdated) Key() string

func (*NodeDataUpdated) Kind

func (e *NodeDataUpdated) Kind() string

type NodeFrozen

type NodeFrozen struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`

	// Status is true when frozen, else false
	Status bool `json:"is_frozen" yaml:"is_frozen"`

	// FrozenAt is the time when node has been frozen or zero when not frozen
	FrozenAt time.Time `json:"frozen_at" yaml:"frozen_at"`
}

NodeFrozen message describe a node frozen state update

func (*NodeFrozen) Kind

func (e *NodeFrozen) Kind() string

type NodeFrozenFileRemoved

type NodeFrozenFileRemoved struct {
	pubsub.Msg `yaml:",inline"`
	File       string `json:"file" yaml:"file"`
}

NodeFrozenFileRemoved is emitted by a fs watcher when a frozen file is removed from var. The nmon goroutine listens to this event and updates the daemondata, which in turns emits a NodeFrozen{} event.

func (*NodeFrozenFileRemoved) Kind

func (e *NodeFrozenFileRemoved) Kind() string

type NodeFrozenFileUpdated

type NodeFrozenFileUpdated struct {
	pubsub.Msg `yaml:",inline"`
	File       string    `json:"file" yaml:"file"`
	At         time.Time `json:"at" yaml:"at"`
}

NodeFrozenFileUpdated is emitted by a fs watcher when a frozen file is updated or created in var. The nmon goroutine listens to this event and updates the daemondata, which in turns emits a NodeFrozen{} event.

func (*NodeFrozenFileUpdated) Kind

func (e *NodeFrozenFileUpdated) Kind() string

type NodeLabelsCommited

type NodeLabelsCommited struct {
	pubsub.Msg `yaml:",inline"`
	Node       string  `json:"node" yaml:"node"`
	Value      label.M `json:"node_labels" yaml:"node_labels"`
}

func (*NodeLabelsCommited) Kind

func (e *NodeLabelsCommited) Kind() string

type NodeLabelsUpdated

type NodeLabelsUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string  `json:"node" yaml:"node"`
	Value      label.M `json:"node_labels" yaml:"node_labels"`
}

func (*NodeLabelsUpdated) Key

func (e *NodeLabelsUpdated) Key() string

func (*NodeLabelsUpdated) Kind

func (e *NodeLabelsUpdated) Kind() string

type NodeMonitorDeleted

type NodeMonitorDeleted struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
}

func (*NodeMonitorDeleted) KeysToDelete

func (e *NodeMonitorDeleted) KeysToDelete() []string

func (*NodeMonitorDeleted) Kind

func (e *NodeMonitorDeleted) Kind() string

type NodeMonitorUpdated

type NodeMonitorUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string       `json:"node" yaml:"node"`
	Value      node.Monitor `json:"node_monitor" yaml:"node_monitor"`
}

func (*NodeMonitorUpdated) Key

func (e *NodeMonitorUpdated) Key() string

func (*NodeMonitorUpdated) Kind

func (e *NodeMonitorUpdated) Kind() string

type NodeOrchestrationAccepted

type NodeOrchestrationAccepted struct {
	pubsub.Msg `yaml:",inline"`
	ID         string `json:"id" yaml:"id"`
	Node       string `json:"node" yaml:"node"`
	// Expect is the state the orchestration is for. A node is asked to
	// freeze by a global expect and to drain by a local one, so this is
	// whichever of the two the request set.
	Expect                string                   `json:"expect" yaml:"expect"`
	GlobalExpect          node.MonitorGlobalExpect `json:"global_expect" yaml:"global_expect"`
	GlobalExpectUpdatedAt time.Time                `json:"global_expect_updated_at" yaml:"global_expect_updated_at"`
}

NodeOrchestrationAccepted says the node monitor took an orchestration on, and under which id. It is the node's version of ObjectOrchestrationAccepted, and carries a node where that carries a path: a target state asked of the nodes is an orchestration of the same kind, run by nmon rather than imon.

func (*NodeOrchestrationAccepted) Kind

type NodeOrchestrationEnd

type NodeOrchestrationEnd struct {
	pubsub.Msg            `yaml:",inline"`
	ID                    string                   `json:"id" yaml:"id"`
	Node                  string                   `json:"node" yaml:"node"`
	Expect                string                   `json:"expect" yaml:"expect"`
	GlobalExpect          node.MonitorGlobalExpect `json:"global_expect" yaml:"global_expect"`
	GlobalExpectUpdatedAt time.Time                `json:"global_expect_updated_at" yaml:"global_expect_updated_at"`
	Aborted               bool                     `json:"aborted" yaml:"aborted"`

	// Failed says the orchestration gave up rather than reached what it
	// was for, and Error says what it ended on. An orchestration ends
	// either way, so the end is not the verdict by itself, and a client
	// waiting on the id would otherwise have to read the states back and
	// judge for itself.
	Failed bool   `json:"failed" yaml:"failed"`
	Error  string `json:"error,omitempty" yaml:"error,omitempty"`
}

func (*NodeOrchestrationEnd) Kind

func (e *NodeOrchestrationEnd) Kind() string

type NodeOrchestrationRefused

type NodeOrchestrationRefused struct {
	pubsub.Msg   `yaml:",inline"`
	ID           string                    `json:"id" yaml:"id"`
	Node         string                    `json:"node" yaml:"node"`
	Reason       string                    `json:"reason" yaml:"reason"`
	GlobalExpect *node.MonitorGlobalExpect `json:"global_expect" yaml:"global_expect"`
}

func (*NodeOrchestrationRefused) Kind

func (e *NodeOrchestrationRefused) Kind() string

type NodeOsPathsUpdated

type NodeOsPathsUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string    `json:"node" yaml:"node"`
	Value      san.Paths `json:"san_paths" yaml:"san_paths"`
}

func (*NodeOsPathsUpdated) Key

func (e *NodeOsPathsUpdated) Key() string

func (*NodeOsPathsUpdated) Kind

func (e *NodeOsPathsUpdated) Kind() string

type NodePoolStatusDeleted

type NodePoolStatusDeleted struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
	Name       string `json:"name" yaml:"name"`
}

func (*NodePoolStatusDeleted) Kind

func (e *NodePoolStatusDeleted) Kind() string

type NodePoolStatusUpdated

type NodePoolStatusUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string      `json:"node" yaml:"node"`
	Name       string      `json:"name" yaml:"name"`
	Value      pool.Status `json:"pool_status" yaml:"pool_status"`
}

func (*NodePoolStatusUpdated) Key

func (e *NodePoolStatusUpdated) Key() string

func (*NodePoolStatusUpdated) Kind

func (e *NodePoolStatusUpdated) Kind() string

type NodeRejoin

type NodeRejoin struct {
	pubsub.Msg     `yaml:",inline"`
	IsUpgrading    bool
	LastShutdownAt time.Time
	Nodes          []string
}

func (*NodeRejoin) Kind

func (e *NodeRejoin) Kind() string

type NodeSplitAction

type NodeSplitAction struct {
	pubsub.Msg      `yaml:",inline"`
	Node            string `json:"node" yaml:"node"`
	Action          string `json:"action" yaml:"action"`
	NodeVotes       int    `json:"node_votes" yaml:"node_votes"`
	ArbitratorVotes int    `json:"arbitrator_votes" yaml:"arbitrator_votes"`
	Voting          int    `json:"voting" yaml:"voting"`
	ProVoters       int    `json:"pro_voters" yaml:"pro_voters"`
}

func (*NodeSplitAction) Kind

func (e *NodeSplitAction) Kind() string

type NodeStale

type NodeStale struct {
	pubsub.Msg `yaml:",inline"`
	Node       string `json:"node" yaml:"node"`
}

func (*NodeStale) Kind

func (e *NodeStale) Kind() string

type NodeStatsUpdated

type NodeStatsUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string     `json:"node" yaml:"node"`
	Value      node.Stats `json:"node_stats" yaml:"node_stats"`
}

func (*NodeStatsUpdated) Key

func (e *NodeStatsUpdated) Key() string

func (*NodeStatsUpdated) Kind

func (e *NodeStatsUpdated) Kind() string

type NodeStatusArbitratorsUpdated

type NodeStatusArbitratorsUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string                           `json:"node" yaml:"node"`
	Value      map[string]node.ArbitratorStatus `json:"arbitrator_status" yaml:"arbitrator_status"`
}

func (*NodeStatusArbitratorsUpdated) Key

func (*NodeStatusArbitratorsUpdated) Kind

type NodeStatusGenUpdates

type NodeStatusGenUpdates struct {
	pubsub.Msg `yaml:",inline"`
	Node       string
	// Value is Node.Status.Gen
	Value node.Gen `json:"gens" yaml:"gens"`
}

NodeStatusGenUpdates is emitted when then hb message gens are changed

func (*NodeStatusGenUpdates) Key

func (e *NodeStatusGenUpdates) Key() string

func (*NodeStatusGenUpdates) Kind

func (e *NodeStatusGenUpdates) Kind() string

type NodeStatusUpdated

type NodeStatusUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Node       string      `json:"node" yaml:"node"`
	Value      node.Status `json:"node_status" yaml:"node_status"`
}

NodeStatusUpdated is the message that nmon publish when node status is modified. The Value.Gen may be outdated, daemondata has the most recent version of gen.

func (*NodeStatusUpdated) Key

func (e *NodeStatusUpdated) Key() string

func (*NodeStatusUpdated) Kind

func (e *NodeStatusUpdated) Kind() string

type ObjectCreated

type ObjectCreated struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	Node       string      `json:"node" yaml:"node"`
}

ObjectCreated is the message published when a new object is detected by localhost.

func (*ObjectCreated) Kind

func (e *ObjectCreated) Kind() string

type ObjectDeleted

type ObjectDeleted struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	Node       string      `json:"node" yaml:"node"`
}

ObjectDeleted is the message published when an object deletion is detected by localhost.

func (*ObjectDeleted) Kind

func (e *ObjectDeleted) Kind() string

type ObjectOrchestrationAccepted

type ObjectOrchestrationAccepted struct {
	pubsub.Msg            `yaml:",inline"`
	ID                    string                       `json:"id" yaml:"id"`
	Node                  string                       `json:"node" yaml:"node"`
	Path                  naming.Path                  `json:"path" yaml:"path"`
	GlobalExpect          instance.MonitorGlobalExpect `json:"global_expect" yaml:"global_expect"`
	GlobalExpectUpdatedAt time.Time                    `json:"global_expect_updated_at" yaml:"global_expect_updated_at"`
}

func (*ObjectOrchestrationAccepted) Kind

type ObjectOrchestrationEnd

type ObjectOrchestrationEnd struct {
	pubsub.Msg            `yaml:",inline"`
	ID                    string                       `json:"id" yaml:"id"`
	Node                  string                       `json:"node" yaml:"node"`
	Path                  naming.Path                  `json:"path" yaml:"path"`
	GlobalExpect          instance.MonitorGlobalExpect `json:"global_expect" yaml:"global_expect"`
	GlobalExpectUpdatedAt time.Time                    `json:"global_expect_updated_at" yaml:"global_expect_updated_at"`
	Aborted               bool                         `json:"aborted" yaml:"aborted"`

	// Failed says the orchestration ended with instances that did not
	// reach what it was for, and Error names them and the state they
	// ended on. An orchestration ends when every node is done with it,
	// whether it did what was asked or gave up, so the end is not the
	// verdict by itself, and a client waiting on the id would otherwise
	// have to read the instance states back and judge for itself.
	Failed bool   `json:"failed" yaml:"failed"`
	Error  string `json:"error,omitempty" yaml:"error,omitempty"`
}

func (*ObjectOrchestrationEnd) Kind

func (e *ObjectOrchestrationEnd) Kind() string

type ObjectOrchestrationRefused

type ObjectOrchestrationRefused struct {
	pubsub.Msg   `yaml:",inline"`
	ID           string                        `json:"id" yaml:"id"`
	Node         string                        `json:"node" yaml:"node"`
	Path         naming.Path                   `json:"path" yaml:"path"`
	Reason       string                        `json:"reason" yaml:"reason"`
	GlobalExpect *instance.MonitorGlobalExpect `json:"global_expect" yaml:"global_expect"`
}

func (*ObjectOrchestrationRefused) Kind

type ObjectStatusDeleted

type ObjectStatusDeleted struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	Node       string      `json:"node" yaml:"node"`
}

func (*ObjectStatusDeleted) KeysToDelete

func (e *ObjectStatusDeleted) KeysToDelete() []string

func (*ObjectStatusDeleted) Kind

func (e *ObjectStatusDeleted) Kind() string

type ObjectStatusDone

type ObjectStatusDone struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
}

func (*ObjectStatusDone) Kind

func (e *ObjectStatusDone) Kind() string

type ObjectStatusUpdated

type ObjectStatusUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path   `json:"path" yaml:"path"`
	Node       string        `json:"node" yaml:"node"`
	Value      object.Status `json:"object_status" yaml:"object_status"`
	SrcEv      any           `json:"source_event" yaml:"source_event"`
}

func (*ObjectStatusUpdated) Key

func (e *ObjectStatusUpdated) Key() string

func (*ObjectStatusUpdated) Kind

func (e *ObjectStatusUpdated) Kind() string

type ProgressInstanceMonitor

type ProgressInstanceMonitor struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path           `json:"path" yaml:"path"`
	Node       string                `json:"node" yaml:"node"`
	State      instance.MonitorState `json:"instance_monitor_state" yaml:"instance_monitor_state"`
	SessionID  xsession.ID           `json:"session_id" yaml:"session_id"`
	IsPartial  bool                  `json:"is_partial" yaml:"is_partial"`
}

func (*ProgressInstanceMonitor) Kind

func (e *ProgressInstanceMonitor) Kind() string

type RemoteFileConfig

type RemoteFileConfig struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	Node       string      `json:"node" yaml:"node"`
	File       string      `json:"file" yaml:"file"`

	// MarkStopped asks that the instance the fetched configuration
	// creates be flagged stopped on purpose, so the daemon does not
	// start it as soon as the configuration lands, before the operator
	// asked for anything.
	MarkStopped bool `json:"mark_stopped" yaml:"mark_stopped"`

	UpdatedAt time.Time       `json:"updated_at" yaml:"updated_at"`
	Ctx       context.Context `json:"-" yaml:"-"`
	Err       chan error      `json:"-" yaml:"-"`
}

func (*RemoteFileConfig) Kind

func (e *RemoteFileConfig) Kind() string

type RunFileRemoved

type RunFileRemoved struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	File       string      `json:"file" yaml:"file"`
	RID        string      `json:"rid" yaml:"rid"`
	At         time.Time   `json:"at" yaml:"at"`
}

RunFileRemoved is emitted by the fs_watcher when it detects a resource run file is deleted in <var>.

func (*RunFileRemoved) Kind

func (e *RunFileRemoved) Kind() string

type RunFileUpdated

type RunFileUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	File       string      `json:"file" yaml:"file"`
	RID        string      `json:"rid" yaml:"rid"`
	At         time.Time   `json:"at" yaml:"at"`
}

RunFileUpdated is emitted by the fs_watcher when it detects a new or initial resource run file in <var>.

func (*RunFileUpdated) Kind

func (e *RunFileUpdated) Kind() string

type SetInstanceMonitor

type SetInstanceMonitor struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path               `json:"path" yaml:"path"`
	Node       string                    `json:"node" yaml:"node"`
	Value      instance.MonitorUpdate    `json:"instance_monitor_update" yaml:"instance_monitor_update"`
	Err        errcontext.ErrCloseSender `json:"-" yaml:"-"`
}

func NewSetInstanceMonitorWithErr

func NewSetInstanceMonitorWithErr(ctx context.Context, p naming.Path, nodename string, value instance.MonitorUpdate) (*SetInstanceMonitor, errcontext.ErrReceiver)

func (*SetInstanceMonitor) Kind

func (e *SetInstanceMonitor) Kind() string

type SetInstanceMonitorRefused

type SetInstanceMonitorRefused struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path            `json:"path" yaml:"path"`
	Node       string                 `json:"node" yaml:"node"`
	Value      instance.MonitorUpdate `json:"instance_monitor_update" yaml:"instance_monitor_update"`
}

func (*SetInstanceMonitorRefused) Kind

type SetNodeMonitor

type SetNodeMonitor struct {
	pubsub.Msg `yaml:",inline"`
	Node       string                    `json:"node" yaml:"node"`
	Value      node.MonitorUpdate        `json:"node_monitor_update" yaml:"node_monitor_update"`
	Err        errcontext.ErrCloseSender `json:"-" yaml:"-"`
}

func NewSetNodeMonitorWithErr

func NewSetNodeMonitorWithErr(ctx context.Context, nodename string, value node.MonitorUpdate) (*SetNodeMonitor, errcontext.ErrReceiver)

func (*SetNodeMonitor) Kind

func (e *SetNodeMonitor) Kind() string

type WatchDog

type WatchDog struct {
	pubsub.Msg `yaml:",inline"`
	Bus        string `json:"bus" yaml:"bus"`
}

func (*WatchDog) Kind

func (e *WatchDog) Kind() string

type ZoneRecordDeleted

type ZoneRecordDeleted struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	Node       string      `json:"node" yaml:"node"`
	Name       string      `json:"name" yaml:"name"`
	Type       string      `json:"type" yaml:"type"`
	TTL        int         `json:"ttl" yaml:"ttl"`
	Content    string      `json:"content" yaml:"content"`
}

func (*ZoneRecordDeleted) KeysToDelete

func (e *ZoneRecordDeleted) KeysToDelete() []string

func (*ZoneRecordDeleted) Kind

func (e *ZoneRecordDeleted) Kind() string

type ZoneRecordUpdated

type ZoneRecordUpdated struct {
	pubsub.Msg `yaml:",inline"`
	Path       naming.Path `json:"path" yaml:"path"`
	Node       string      `json:"node" yaml:"node"`
	Name       string      `json:"name" yaml:"name"`
	Type       string      `json:"type" yaml:"type"`
	TTL        int         `json:"ttl" yaml:"ttl"`
	Content    string      `json:"content" yaml:"content"`
}

func (*ZoneRecordUpdated) Key

func (e *ZoneRecordUpdated) Key() string

func (*ZoneRecordUpdated) Kind

func (e *ZoneRecordUpdated) Kind() string

Jump to

Keyboard shortcuts

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