blob: da898bfc19d96e11a0aa998250fd07330a3a534e [file] [log] [blame]
Serge Bazanskia959cbd2021-06-17 15:56:51 +02001package cluster
2
3import (
4 "errors"
Serge Bazanskia959cbd2021-06-17 15:56:51 +02005
Serge Bazanski5839e972021-11-16 15:46:19 +01006 "source.monogon.dev/metropolis/node/core/consensus"
Serge Bazanski3379a5d2021-09-09 12:56:40 +02007 "source.monogon.dev/metropolis/node/core/identity"
Serge Bazanskia959cbd2021-06-17 15:56:51 +02008 cpb "source.monogon.dev/metropolis/proto/common"
9)
10
11var (
12 ErrNoLocalConsensus = errors.New("this node does not have direct access to etcd")
13)
14
15// Status is returned to Cluster clients (ie., node code) on Manager.Watch/.Get.
16type Status struct {
17 // State is the current state of the cluster, as seen by the node.
18 State cpb.ClusterState
19
Serge Bazanski5839e972021-11-16 15:46:19 +010020 // Consensus is a handle to a running Consensus service, or nil if this node
21 // does not run a Consensus instance.
22 Consensus consensus.ServiceHandle
Serge Bazanskia959cbd2021-06-17 15:56:51 +020023
24 // Credentials used for the node to authenticate to the Curator and other
25 // cluster services.
Serge Bazanski3379a5d2021-09-09 12:56:40 +020026 Credentials *identity.NodeCredentials
Serge Bazanskia959cbd2021-06-17 15:56:51 +020027}