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
No related branches found
No related tags found
No related merge requests found
...@@ -12,14 +12,26 @@ import ( ...@@ -12,14 +12,26 @@ import (
"time" "time"
) )
var ( const (
MasterElectionPath = "/icecast/cluster/master" // Path to the mount configuration in etcd. This should never
MountPrefix = "/icecast/mounts/" // change, upgrades to the configuration format should be
NodePrefix = "/icecast/nodes/" // 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 IcecastPort = 8000
IcecastMountPrefix = "/_stream" IcecastMountPrefix = "/_stream"
)
var (
ErrIsDirectory = errors.New("key is a directory") ErrIsDirectory = errors.New("key is a directory")
ErrIsFile = errors.New("key is a file") ErrIsFile = errors.New("key is a file")
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment