Skip to content
Snippets Groups Projects
Commit e208d698 authored by ale's avatar ale
Browse files

add versioning to the cluster runtime data in etcd

This change allows us to introduce changes to the inner workings of the
cluster that break backwards compatibility, allowing a smooth transition
to the new format.
parent 1d89026a
Branches
No related tags found
No related merge requests found
......@@ -12,14 +12,26 @@ import (
"time"
)
var (
MasterElectionPath = "/icecast/cluster/master"
MountPrefix = "/icecast/mounts/"
NodePrefix = "/icecast/nodes/"
const (
// Path to the mount configuration in etcd. This should never
// change, upgrades to the configuration format should be
// backwards-compatible.
MountPrefix = "/icecast/mounts/"
// Path for the cluster runtime data. Whenever the format of
// this data changes, the ABIVersion should be increased. A
// rolling restart of the cluster will then seamlessly cause a
// transition to the new consensus (the cluster will be
// partitioned in the meantime).
ABIVersion = "2"
MasterElectionPath = "/icecast/" + ABIVersion + "/cluster/master"
NodePrefix = "/icecast/" + ABIVersion + "/nodes/"
IcecastPort = 8000
IcecastMountPrefix = "/_stream"
)
var (
ErrIsDirectory = errors.New("key is a directory")
ErrIsFile = errors.New("key is a file")
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment