-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the peergrouper to use clock.Clock, and publish an event ove…
…r pubsub when the collection of apiservers change.
- Loading branch information
Showing
4 changed files
with
167 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2016 Canonical Ltd. | ||
// Licensed under the AGPLv3, see LICENCE file for details. | ||
|
||
package apiserver | ||
|
||
// DetailsTopic is the topic name for the published message when the details of | ||
// the api servers change. This message is normally published by the peergrouper | ||
// when the set of API servers changes. | ||
const DetailsTopic = "apiserver.details" | ||
|
||
// APIServer defines a single api server machine. | ||
type APIServer struct { | ||
Id string `yaml:"id"` | ||
Addresses []string `yaml:"addresses"` | ||
} | ||
|
||
// Details defines the message structure for the apiserver.details topic. | ||
type Details struct { | ||
Servers []APIServer `yaml:"servers"` | ||
LocalOnly bool `yaml:"local-only"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.