Documentation
¶
Overview ¶
package consul deals with syncing Marathon apps and tasks to Consul.
Index ¶
- func MapApps(source []*apps.App) map[string]*api.KVPair
- func MapKVPairs(source api.KVPairs) map[string]*api.KVPair
- func MapTasks(source []*tasks.Task) map[string]*api.KVPair
- func WithPrefix(prefix, key string) string
- func WithoutPrefix(prefix, key string) string
- type Consul
- func (consul *Consul) DeleteApp(app *apps.App) error
- func (consul *Consul) DeleteTask(task *tasks.Task) error
- func (consul *Consul) SyncApps(apps []*apps.App) error
- func (consul *Consul) SyncTasks(appId string, tasks []*tasks.Task) error
- func (consul *Consul) UpdateApp(app *apps.App) error
- func (consul *Consul) UpdateTask(task *tasks.Task) error
- type Deleter
- type Getter
- type KV
- type KVer
- type Lister
- type Putter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithPrefix ¶
func WithoutPrefix ¶
Types ¶
type Consul ¶
type Consul struct { AppsPrefix string // contains filtered or unexported fields }
func (*Consul) DeleteTask ¶
DeleteTask taske a Task and deletes it from Consul
func (*Consul) SyncApps ¶
SyncApps takes a *complete* list of apps from Marathon and compares them against the apps in Consul. It performs any necessary updates, then recursively deletes any apps that are present in Consul but not the given list.
func (*Consul) SyncTasks ¶
SyncTasks takes a *complete* list of tasks from a Marathon App and compares them against the tasks in Consul. It performs any necessary updates, then deletes any tasks that are present in Consul but not the list.
type KV ¶
type KV struct { WriteOptions *api.WriteOptions QueryOptions *api.QueryOptions Prefix string // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.