Serge Bazanski | a959cbd | 2021-06-17 15:56:51 +0200 | [diff] [blame] | 1 | package cluster |
| 2 | |
| 3 | import ( |
| 4 | "errors" |
Serge Bazanski | a959cbd | 2021-06-17 15:56:51 +0200 | [diff] [blame] | 5 | |
Serge Bazanski | 5839e97 | 2021-11-16 15:46:19 +0100 | [diff] [blame^] | 6 | "source.monogon.dev/metropolis/node/core/consensus" |
Serge Bazanski | 3379a5d | 2021-09-09 12:56:40 +0200 | [diff] [blame] | 7 | "source.monogon.dev/metropolis/node/core/identity" |
Serge Bazanski | a959cbd | 2021-06-17 15:56:51 +0200 | [diff] [blame] | 8 | cpb "source.monogon.dev/metropolis/proto/common" |
| 9 | ) |
| 10 | |
| 11 | var ( |
| 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. |
| 16 | type Status struct { |
| 17 | // State is the current state of the cluster, as seen by the node. |
| 18 | State cpb.ClusterState |
| 19 | |
Serge Bazanski | 5839e97 | 2021-11-16 15:46:19 +0100 | [diff] [blame^] | 20 | // 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 Bazanski | a959cbd | 2021-06-17 15:56:51 +0200 | [diff] [blame] | 23 | |
| 24 | // Credentials used for the node to authenticate to the Curator and other |
| 25 | // cluster services. |
Serge Bazanski | 3379a5d | 2021-09-09 12:56:40 +0200 | [diff] [blame] | 26 | Credentials *identity.NodeCredentials |
Serge Bazanski | a959cbd | 2021-06-17 15:56:51 +0200 | [diff] [blame] | 27 | } |