github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/apiserver/params/leadership.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package params 5 6 // ClaimLeadershipBulkParams is a collection of parameters for making 7 // a bulk leadership claim. 8 type ClaimLeadershipBulkParams struct { 9 10 // Params are the parameters for making a bulk leadership claim. 11 Params []ClaimLeadershipParams 12 } 13 14 // ClaimLeadershipParams are the parameters needed for making a 15 // leadership claim. 16 type ClaimLeadershipParams struct { 17 18 // ServiceTag is the service for which you want to make a 19 // leadership claim. 20 ServiceTag string 21 22 // UnitTag is the unit which is making the leadership claim. 23 UnitTag string 24 25 // DurationSeconds is the number of seconds for which the lease is required. 26 DurationSeconds float64 27 } 28 29 // ClaimLeadershipBulkResults is the collection of results from a bulk 30 // leadership claim. 31 type ClaimLeadershipBulkResults ErrorResults 32 33 // ReleaseLeadershipBulkParams is a collection of parameters needed to 34 // make a bulk release leadership call. 35 type ReleaseLeadershipBulkParams struct { 36 Params []ReleaseLeadershipParams 37 } 38 39 // ReleaseLeadershipParams are the parameters needed to release a 40 // leadership claim. 41 type ReleaseLeadershipParams struct { 42 43 // ServiceTag is the service for which you want to make a 44 // leadership claim. 45 ServiceTag string 46 47 // UnitTag is the unit which is making the leadership claim. 48 UnitTag string 49 } 50 51 // ReleaseLeadershipBulkResults is a type which contains results from 52 // a bulk leadership call. 53 type ReleaseLeadershipBulkResults ErrorResults 54 55 // GetLeadershipSettingsBulkResults is the collection of results from 56 // a bulk request for leadership settings. 57 type GetLeadershipSettingsBulkResults struct { 58 Results []GetLeadershipSettingsResult 59 } 60 61 // GetLeadershipSettingsResult is the results from requesting 62 // leadership settings. 63 type GetLeadershipSettingsResult struct { 64 Settings Settings 65 Error *Error 66 } 67 68 // MergeLeadershipSettingsBulkParams is a collection of parameters for 69 // making a bulk merge of leadership settings. 70 type MergeLeadershipSettingsBulkParams struct { 71 72 // Params are the parameters for making a bulk leadership settings 73 // merge. 74 Params []MergeLeadershipSettingsParam 75 } 76 77 // MergeLeadershipSettingsParam are the parameters needed for merging 78 // in leadership settings. 79 type MergeLeadershipSettingsParam struct { 80 // ServiceTag is the service for which you want to merge 81 // leadership settings. 82 ServiceTag string 83 84 // Settings are the Leadership settings you wish to merge in. 85 Settings Settings 86 }