Documentation ¶
Index ¶
- func LeaderAPIsHealthy(ctx context.Context, apis []LeaderAPI) error
- func LeaderAPIsHealthyNow(apis []LeaderAPI) (string, error)
- func LeaderPeerAPIsHealthy(ctx context.Context, apis []LeaderPeersAPI, expectedPeers []string) error
- func LeaderPeerAPIsHealthyNow(apis []LeaderPeersAPI, expectedPeers []string) error
- type APIConfig
- type Command
- type Config
- type Harness
- type LeaderAPI
- type LeaderPeersAPI
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LeaderAPIsHealthyNow ¶
func LeaderPeerAPIsHealthy ¶
func LeaderPeerAPIsHealthy(ctx context.Context, apis []LeaderPeersAPI, expectedPeers []string) error
func LeaderPeerAPIsHealthyNow ¶
func LeaderPeerAPIsHealthyNow(apis []LeaderPeersAPI, expectedPeers []string) error
Types ¶
type APIConfig ¶
APIConfig contains enough information to create a connection to a service: the address of the service and the CA needed for TLS handshaking.
type Command ¶
type Command interface { Name() string // Args are the command-line arguments to launch the process with. Args() []string // Env is the key=value settings to put in the environment. Env() []string // Files are a map from base file name to file contents. These inputs // must be written to the ConfigDir before launch. Files() map[string]string // WithConfig returns a new Command with alternate config Config() Config WithConfig(Config) Command }
Command describes how to run and interact with a process that starts a service.
type Config ¶
type Config struct { // ConfigDir is where config files live ConfigDir string // DataDir is where the process writes data DataDir string // LogDir is where logs are written by the process, if it knows how to // log to disk. LogDir string // NetworkConfig specifies how network addresses get assigned NetworkConfig yurt.NetworkConfig // NodeName is the name for this instance of the process. This may or // may not be an addressable name, depending on NetworkConfig. NodeName string TLS pki.TLSConfigPEM Ports yurt.Ports }
Config is the common config shared by all runners, though not all members may be used. For example, a stateless service may have no DataDir.
type Harness ¶
type Harness interface { // Endpoint returns the config for the named service. If local is true, // the config is relative to the caller, otherwise it is given in terms // of the service nodes themselves. These may be equivalent depending // on the execution model, i.e. whether port forwarding is being used // to bridge the local and execution networks. Endpoint(name string, local bool) (*APIConfig, error) Stop() error Kill() Wait() error }
type LeaderPeersAPI ¶
LeaderPeersAPI describes a distributed consensus API of many nodes with a single leader under quorum.
Click to show internal directories.
Click to hide internal directories.