1
// Copyright 2015 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
6
// ClaimLeadershipBulkParams is a collection of parameters for making
7
// a bulk leadership claim.
8
type ClaimLeadershipBulkParams struct {
10
// Params are the parameters for making a bulk leadership claim.
11
Params []ClaimLeadershipParams `json:"params"`
14
// ClaimLeadershipParams are the parameters needed for making a
16
type ClaimLeadershipParams struct {
18
// ApplicationTag is the application for which you want to make a
20
ApplicationTag string `json:"application-tag"`
22
// UnitTag is the unit which is making the leadership claim.
23
UnitTag string `json:"unit-tag"`
25
// DurationSeconds is the number of seconds for which the lease is required.
26
DurationSeconds float64 `json:"duration"`
29
// ClaimLeadershipBulkResults is the collection of results from a bulk
31
type ClaimLeadershipBulkResults ErrorResults
33
// ReleaseLeadershipBulkParams is a collection of parameters needed to
34
// make a bulk release leadership call.
35
type ReleaseLeadershipBulkParams struct {
36
Params []ReleaseLeadershipParams `json:"params"`
39
// ReleaseLeadershipParams are the parameters needed to release a
41
type ReleaseLeadershipParams struct {
43
// ApplicationTag is the application for which you want to make a
45
ApplicationTag string `json:"application-tag"`
47
// UnitTag is the unit which is making the leadership claim.
48
UnitTag string `json:"unit-tag"`
51
// ReleaseLeadershipBulkResults is a type which contains results from
52
// a bulk leadership call.
53
type ReleaseLeadershipBulkResults ErrorResults
55
// GetLeadershipSettingsBulkResults is the collection of results from
56
// a bulk request for leadership settings.
57
type GetLeadershipSettingsBulkResults struct {
58
Results []GetLeadershipSettingsResult `json:"results"`
61
// GetLeadershipSettingsResult is the results from requesting
62
// leadership settings.
63
type GetLeadershipSettingsResult struct {
64
Settings Settings `json:"settings"`
65
Error *Error `json:"error,omitempty"`
68
// MergeLeadershipSettingsBulkParams is a collection of parameters for
69
// making a bulk merge of leadership settings.
70
type MergeLeadershipSettingsBulkParams struct {
72
// Params are the parameters for making a bulk leadership settings
74
Params []MergeLeadershipSettingsParam `json:"params"`
77
// MergeLeadershipSettingsParam are the parameters needed for merging
78
// in leadership settings.
79
type MergeLeadershipSettingsParam struct {
80
// ApplicationTag is the application for which you want to merge
81
// leadership settings.
82
ApplicationTag string `json:"application-tag"`
84
// Settings are the Leadership settings you wish to merge in.
85
Settings Settings `json:"settings"`