Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // RolloutErr defines the rollout config error class. RolloutErr = errs.Class("rollout config error") // EmptySeedErr is used when the rollout contains an empty seed value. EmptySeedErr = RolloutErr.New("empty seed") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Address string `user:"true" help:"public address to listen on" default:":8080"` Versions OldVersionConfig Binary ProcessesConfig }
Config is all the configuration parameters for a Version Control Server.
type OldVersionConfig ¶ added in v0.24.0
type OldVersionConfig struct { Satellite string `user:"true" help:"Allowed Satellite Versions" default:"v0.0.1"` Storagenode string `user:"true" help:"Allowed Storagenode Versions" default:"v0.0.1"` Uplink string `user:"true" help:"Allowed Uplink Versions" default:"v0.0.1"` Gateway string `user:"true" help:"Allowed Gateway Versions" default:"v0.0.1"` Identity string `user:"true" help:"Allowed Identity Versions" default:"v0.0.1"` }
OldVersionConfig provides a list of allowed Versions per process. NB: this will be deprecated in favor of `ProcessesConfig`.
type Peer ¶
type Peer struct { // core dependencies Log *zap.Logger // Web server Server struct { Endpoint http.Server Listener net.Listener } Versions version.AllowedVersions // contains filtered or unexported fields }
Peer is the representation of a VersionControl Server.
architecture: Peer
type ProcessConfig ¶ added in v0.24.0
type ProcessConfig struct { Minimum VersionConfig Suggested VersionConfig Rollout RolloutConfig }
ProcessConfig represents versions configuration for a single process.
type ProcessesConfig ¶ added in v0.24.0
type ProcessesConfig struct { Satellite ProcessConfig Storagenode ProcessConfig StoragenodeUpdater ProcessConfig Uplink ProcessConfig Gateway ProcessConfig Identity ProcessConfig }
ProcessesConfig represents versions configuration for all processes.
func (ProcessesConfig) ValidateRollouts ¶ added in v0.24.0
func (versions ProcessesConfig) ValidateRollouts(log *zap.Logger) error
ValidateRollouts validates the rollout field of each field in the Versions struct.
type RolloutConfig ¶ added in v0.24.0
type RolloutConfig struct { Seed string `user:"true" help:"random 32 byte, hex-encoded string"` Cursor int `user:"true" help:"percentage of nodes which should roll-out to the suggested version" default:"0"` }
RolloutConfig represents the state of a version rollout configuration of a process.
func (RolloutConfig) Validate ¶ added in v0.24.0
func (rollout RolloutConfig) Validate() error
Validate validates the rollout seed and cursor config values.
type VersionConfig ¶ added in v0.24.0
type VersionConfig struct { Version string `user:"true" help:"peer version" default:"v0.0.1"` URL string `user:"true" help:"URL for specific binary" default:""` }
VersionConfig single version configuration.