Documentation ¶
Index ¶
- func NewAclRule() *aclRule
- func NewConsul() *consul
- func ParseCheckConfig(s string) (*consulapi.AgentServiceCheck, error)
- type Acl
- func (a *Acl) AddCloneSub(c *cobra.Command)
- func (a *Acl) AddCreateSub(c *cobra.Command)
- func (a *Acl) AddDestroySub(c *cobra.Command)
- func (a *Acl) AddInfoSub(c *cobra.Command)
- func (a *Acl) AddListSub(c *cobra.Command)
- func (a *Acl) AddUpdateSub(c *cobra.Command)
- func (a *Acl) CheckIdArg(args []string) error
- func (a *Acl) Clone(args []string) error
- func (a *Acl) Create(args []string, aco *AclCreateOptions) error
- func (a *Acl) Destroy(args []string) error
- func (a *Acl) GetRulesString(rs []*ConfigRule) (string, error)
- func (a *Acl) Info(args []string) error
- func (a *Acl) List(args []string) error
- func (a *Acl) ParseRuleConfig(s string) (*ConfigRule, error)
- func (a *Acl) Update(args []string, auo *AclUpdateOptions) error
- type AclCreateOptions
- type AclUpdateOptions
- type Agent
- func (a *Agent) AddChecksSub(c *cobra.Command)
- func (a *Agent) AddForceLeaveSub(c *cobra.Command)
- func (a *Agent) AddJoinSub(c *cobra.Command)
- func (a *Agent) AddMaintenanceSub(c *cobra.Command)
- func (a *Agent) AddMembersSub(c *cobra.Command)
- func (a *Agent) AddSelfSub(c *cobra.Command)
- func (a *Agent) AddServicesSub(c *cobra.Command)
- func (a *Agent) Checks(args []string) error
- func (a *Agent) ForceLeave(args []string) error
- func (a *Agent) Join(args []string, ajo *AgentJoinOptions) error
- func (a *Agent) Maintenance(args []string, amo *AgentMaintenanceOptions) error
- func (a *Agent) Members(args []string, amo *AgentMembersOptions) error
- func (a *Agent) Self(args []string) error
- func (a *Agent) Services(args []string) error
- type AgentJoinOptions
- type AgentMaintenanceOptions
- type AgentMembersOptions
- type Catalog
- func (c *Catalog) AddDatacentersSub(cmd *cobra.Command)
- func (c *Catalog) AddNodeSub(cmd *cobra.Command)
- func (c *Catalog) AddNodesSub(cmd *cobra.Command)
- func (c *Catalog) AddServiceSub(cmd *cobra.Command)
- func (c *Catalog) AddServicesSub(cmd *cobra.Command)
- func (c *Catalog) Datacenters(args []string) error
- func (c *Catalog) Node(args []string) error
- func (c *Catalog) Nodes(args []string) error
- func (c *Catalog) Service(args []string, cso *CatalogServiceOptions) error
- func (c *Catalog) Services(args []string) error
- type CatalogServiceOptions
- type Check
- func (c *Check) AddDeregisterSub(cmd *cobra.Command)
- func (c *Check) AddFailSub(cmd *cobra.Command)
- func (c *Check) AddPassSub(cmd *cobra.Command)
- func (c *Check) AddRegisterSub(cmd *cobra.Command)
- func (c *Check) AddWarnSub(cmd *cobra.Command)
- func (c *Check) CheckIdArg(args []string) error
- func (c *Check) Deregister(args []string) error
- func (c *Check) Fail(args []string, cfo *CheckFailOptions) error
- func (c *Check) Pass(args []string, cfo *CheckPassOptions) error
- func (c *Check) Register(args []string, cro *CheckRegisterOptions) error
- func (c *Check) Warn(args []string, cfo *CheckWarnOptions) error
- type CheckFailOptions
- type CheckPassOptions
- type CheckRegisterOptions
- type CheckWarnOptions
- type Cmd
- func (c *Cmd) ACL() (*consulapi.ACL, error)
- func (c *Cmd) AddCommand(cmd *cobra.Command)
- func (c *Cmd) AddDatacenterOption(cmd *cobra.Command)
- func (c *Cmd) AddTemplateOption(cmd *cobra.Command)
- func (c *Cmd) AddWaitIndexOption(cmd *cobra.Command)
- func (c *Cmd) Agent() (*consulapi.Agent, error)
- func (c *Cmd) Catalog() (*consulapi.Catalog, error)
- func (c *Cmd) Client() (*consulapi.Client, error)
- func (c *Cmd) Coordinate() (*consulapi.Coordinate, error)
- func (c *Cmd) Execute() error
- func (c *Cmd) Health() (*consulapi.Health, error)
- func (c *Cmd) Help() error
- func (c *Cmd) KV() (*consulapi.KV, error)
- func (c *Cmd) Output(v interface{}) error
- func (c *Cmd) OutputJSON(v interface{}, prettyFlag bool) error
- func (c *Cmd) OutputTemplate(v interface{}) error
- func (c *Cmd) QueryOptions() *consulapi.QueryOptions
- func (c *Cmd) Session() (*consulapi.Session, error)
- func (c *Cmd) Status() (*consulapi.Status, error)
- func (c *Cmd) WriteOptions() *consulapi.WriteOptions
- type ConfigRule
- type Coordinate
- type Health
- func (h *Health) AddChecksSub(cmd *cobra.Command)
- func (h *Health) AddNodeSub(cmd *cobra.Command)
- func (h *Health) AddServiceSub(cmd *cobra.Command)
- func (h *Health) AddStateSub(cmd *cobra.Command)
- func (h *Health) Checks(args []string) error
- func (h *Health) Node(args []string) error
- func (h *Health) Service(args []string, hso *HealthServiceOptions) error
- func (h *Health) State(args []string) error
- type HealthServiceOptions
- type KVJson
- type KVOutput
- func (kvo *KVOutput) Output(kv *consulapi.KVPair, of OutputFormat) error
- func (kvo *KVOutput) OutputHeader(of OutputFormat)
- func (kvo *KVOutput) OutputJSON(kv *consulapi.KVPair, prettyFlag bool) error
- func (kvo *KVOutput) OutputJSONList(kvs *consulapi.KVPairs, prettyFlag bool) error
- func (kvo *KVOutput) OutputList(kvs *consulapi.KVPairs, of OutputFormat) error
- func (kvo *KVOutput) OutputText(kv *consulapi.KVPair, of OutputFormat) error
- func (kvo *KVOutput) OutputTextList(kvs *consulapi.KVPairs, of OutputFormat) error
- type Kv
- func (k *Kv) AddBulkloadSub(cmd *cobra.Command)
- func (k *Kv) AddDeleteSub(cmd *cobra.Command)
- func (k *Kv) AddKeysSub(cmd *cobra.Command)
- func (k *Kv) AddLockSub(cmd *cobra.Command)
- func (k *Kv) AddReadSub(cmd *cobra.Command)
- func (k *Kv) AddUnlockSub(cmd *cobra.Command)
- func (k *Kv) AddWatchSub(cmd *cobra.Command)
- func (k *Kv) AddWriteSub(cmd *cobra.Command)
- func (k *Kv) Bulkload(args []string, kbo *KvBulkloadOptions) error
- func (k *Kv) Delete(args []string, kdo *KvDeleteOptions) error
- func (k *Kv) Keys(args []string, kko *KvKeysOptions) error
- func (k *Kv) Lock(args []string, klo *KvLockOptions) error
- func (k *Kv) Read(args []string, kro *KvReadOptions) error
- func (k *Kv) Unlock(args []string, kuo *KvUnlockOptions) error
- func (k *Kv) Watch(args []string, kwo *KvWatchOptions) error
- func (k *Kv) Write(args []string, kwo *KvWriteOptions) error
- type KvBulkloadOptions
- type KvDeleteOptions
- type KvKeysOptions
- type KvLockOptions
- type KvReadOptions
- type KvUnlockOptions
- type KvWatchOptions
- type KvWriteOptions
- type OutputFormat
- type Service
- func (s *Service) AddDeregisterSub(cmd *cobra.Command)
- func (s *Service) AddMaintenanceSub(cmd *cobra.Command)
- func (s *Service) AddRegisterSub(cmd *cobra.Command)
- func (s *Service) CheckIdArg(args []string) error
- func (s *Service) Deregister(args []string) error
- func (s *Service) Maintenance(args []string, smo *ServiceMaintenanceOptions) error
- func (s *Service) Register(args []string, sro *ServiceRegisterOptions) error
- type ServiceMaintenanceOptions
- type ServiceRegisterOptions
- type Session
- func (s *Session) AddCreateSub(cmd *cobra.Command)
- func (s *Session) AddDestroySub(cmd *cobra.Command)
- func (s *Session) AddInfoSub(cmd *cobra.Command)
- func (s *Session) AddListSub(cmd *cobra.Command)
- func (s *Session) AddNodeSub(cmd *cobra.Command)
- func (s *Session) AddRenewSub(cmd *cobra.Command)
- func (s *Session) CheckIdArg(args []string) error
- func (s *Session) Create(args []string, sco *SessionCreateOptions) error
- func (s *Session) Destroy(args []string) error
- func (s *Session) Info(args []string) error
- func (s *Session) List(args []string) error
- func (s *Session) Node(args []string) error
- func (s *Session) Renew(args []string) error
- type SessionCreateOptions
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAclRule ¶ added in v0.3.0
func NewAclRule() *aclRule
func ParseCheckConfig ¶
func ParseCheckConfig(s string) (*consulapi.AgentServiceCheck, error)
Types ¶
type Acl ¶
type Acl struct {
*Cmd
}
func (*Acl) AddCloneSub ¶
func (*Acl) AddCreateSub ¶
func (*Acl) AddDestroySub ¶
func (*Acl) AddInfoSub ¶
func (*Acl) AddListSub ¶
func (*Acl) AddUpdateSub ¶
func (*Acl) CheckIdArg ¶
func (*Acl) GetRulesString ¶
func (a *Acl) GetRulesString(rs []*ConfigRule) (string, error)
Convert a list of Rules to a JSON string
func (*Acl) ParseRuleConfig ¶
func (a *Acl) ParseRuleConfig(s string) (*ConfigRule, error)
type AclCreateOptions ¶
type AclCreateOptions struct { IsManagement bool Name string ConfigRules []*ConfigRule }
type AclUpdateOptions ¶
type AclUpdateOptions struct { IsManagement bool Name string ConfigRules []*ConfigRule }
type Agent ¶
type Agent struct {
*Cmd
}
func (*Agent) AddChecksSub ¶
func (*Agent) AddForceLeaveSub ¶
func (*Agent) AddJoinSub ¶
func (*Agent) AddMaintenanceSub ¶
func (*Agent) AddMembersSub ¶
func (*Agent) AddSelfSub ¶
func (*Agent) AddServicesSub ¶
func (*Agent) ForceLeave ¶
func (*Agent) Maintenance ¶
func (a *Agent) Maintenance(args []string, amo *AgentMaintenanceOptions) error
type AgentJoinOptions ¶
type AgentJoinOptions struct {
// contains filtered or unexported fields
}
type AgentMaintenanceOptions ¶
type AgentMaintenanceOptions struct {
// contains filtered or unexported fields
}
type AgentMembersOptions ¶
type AgentMembersOptions struct {
// contains filtered or unexported fields
}
type Catalog ¶
type Catalog struct {
*Cmd
}
func (*Catalog) AddDatacentersSub ¶
func (*Catalog) AddNodeSub ¶
func (*Catalog) AddNodesSub ¶
func (*Catalog) AddServiceSub ¶
func (*Catalog) AddServicesSub ¶
func (*Catalog) Datacenters ¶
type CatalogServiceOptions ¶
type CatalogServiceOptions struct {
// contains filtered or unexported fields
}
type Check ¶
type Check struct {
*Cmd
}
func (*Check) AddDeregisterSub ¶
func (*Check) AddFailSub ¶
func (*Check) AddPassSub ¶
func (*Check) AddRegisterSub ¶
func (*Check) AddWarnSub ¶
func (*Check) CheckIdArg ¶
func (*Check) Deregister ¶
type CheckFailOptions ¶
type CheckFailOptions struct {
Note string
}
type CheckPassOptions ¶
type CheckPassOptions struct {
Note string
}
type CheckRegisterOptions ¶
type CheckWarnOptions ¶
type CheckWarnOptions struct {
Note string
}
type Cmd ¶
type Cmd struct { Err io.Writer Out io.Writer Template string // contains filtered or unexported fields }
func (*Cmd) AddCommand ¶
func (*Cmd) AddDatacenterOption ¶
func (*Cmd) AddTemplateOption ¶
func (*Cmd) AddWaitIndexOption ¶
func (*Cmd) Coordinate ¶
func (c *Cmd) Coordinate() (*consulapi.Coordinate, error)
func (*Cmd) OutputJSON ¶
func (*Cmd) OutputTemplate ¶
func (*Cmd) QueryOptions ¶
func (c *Cmd) QueryOptions() *consulapi.QueryOptions
func (*Cmd) WriteOptions ¶
func (c *Cmd) WriteOptions() *consulapi.WriteOptions
type ConfigRule ¶
type Coordinate ¶
type Coordinate struct {
*Cmd
}
func (*Coordinate) AddDatacentersSub ¶
func (c *Coordinate) AddDatacentersSub(cmd *cobra.Command)
func (*Coordinate) AddNodesSub ¶
func (c *Coordinate) AddNodesSub(cmd *cobra.Command)
func (*Coordinate) Datacenters ¶
func (c *Coordinate) Datacenters(args []string) error
func (*Coordinate) Nodes ¶
func (c *Coordinate) Nodes(args []string) error
type Health ¶
type Health struct {
*Cmd
}
func (*Health) AddChecksSub ¶
func (*Health) AddNodeSub ¶
func (*Health) AddServiceSub ¶
func (*Health) AddStateSub ¶
type HealthServiceOptions ¶
type KVJson ¶
type KVJson struct { Key string CreateIndex uint64 ModifyIndex uint64 LockIndex uint64 Flags uint64 Value string Session string }
Conveninece structure for JSON
type KVOutput ¶
type KVOutput struct { Out io.Writer Err io.Writer All bool Key bool CreateIndex bool ModifyIndex bool LockIndex bool Flags bool Value bool Session bool }
Output structure
func (*KVOutput) OutputHeader ¶
func (kvo *KVOutput) OutputHeader(of OutputFormat)
func (*KVOutput) OutputJSON ¶
func (*KVOutput) OutputJSONList ¶
func (*KVOutput) OutputList ¶
func (kvo *KVOutput) OutputList(kvs *consulapi.KVPairs, of OutputFormat) error
func (*KVOutput) OutputText ¶
func (kvo *KVOutput) OutputText(kv *consulapi.KVPair, of OutputFormat) error
func (*KVOutput) OutputTextList ¶
func (kvo *KVOutput) OutputTextList(kvs *consulapi.KVPairs, of OutputFormat) error
type Kv ¶
type Kv struct {
*Cmd
}
func (*Kv) AddBulkloadSub ¶
func (*Kv) AddDeleteSub ¶
func (*Kv) AddKeysSub ¶
func (*Kv) AddLockSub ¶
func (*Kv) AddReadSub ¶
func (*Kv) AddUnlockSub ¶
func (*Kv) AddWatchSub ¶
func (*Kv) AddWriteSub ¶
type KvBulkloadOptions ¶
type KvDeleteOptions ¶
type KvKeysOptions ¶
type KvKeysOptions struct {
Separator string
}
type KvLockOptions ¶
type KvReadOptions ¶
type KvReadOptions struct { Format OutputFormat FieldsRaw string Recurse bool }
type KvUnlockOptions ¶
type KvWatchOptions ¶
type KvWatchOptions struct { Format OutputFormat FieldsRaw string }
type KvWriteOptions ¶
type OutputFormat ¶
Output format structure
type Service ¶
type Service struct {
*Cmd
}
func (*Service) AddDeregisterSub ¶
func (*Service) AddMaintenanceSub ¶
func (*Service) AddRegisterSub ¶
func (*Service) CheckIdArg ¶
func (*Service) Deregister ¶
func (*Service) Maintenance ¶
func (s *Service) Maintenance(args []string, smo *ServiceMaintenanceOptions) error
type ServiceMaintenanceOptions ¶
type ServiceMaintenanceOptions struct {
// contains filtered or unexported fields
}
type ServiceRegisterOptions ¶
type Session ¶
type Session struct {
*Cmd
}
func (*Session) AddCreateSub ¶
func (*Session) AddDestroySub ¶
func (*Session) AddInfoSub ¶
func (*Session) AddListSub ¶
func (*Session) AddNodeSub ¶
func (*Session) AddRenewSub ¶
func (*Session) CheckIdArg ¶
type SessionCreateOptions ¶
type Status ¶
type Status struct {
*Cmd
}
func (*Status) AddLeaderSub ¶
func (*Status) AddPeersSub ¶
Source Files ¶
- acl.go
- acl_clone.go
- acl_create.go
- acl_destroy.go
- acl_info.go
- acl_list.go
- acl_update.go
- agent.go
- agent_checks.go
- agent_force_leave.go
- agent_join.go
- agent_maintenance.go
- agent_members.go
- agent_self.go
- agent_services.go
- catalog.go
- catalog_datacenters.go
- catalog_node.go
- catalog_nodes.go
- catalog_service.go
- catalog_services.go
- check.go
- check_deregister.go
- check_fail.go
- check_pass.go
- check_register.go
- check_warn.go
- commands.go
- consul.go
- coordinate.go
- coordinate_datacenters.go
- coordinate_nodes.go
- health.go
- health_checks.go
- health_node.go
- health_service.go
- health_state.go
- kv.go
- kv_bulkload.go
- kv_delete.go
- kv_keys.go
- kv_lock.go
- kv_output.go
- kv_read.go
- kv_unlock.go
- kv_watch.go
- kv_write.go
- output.go
- service.go
- service_deregister.go
- service_maintenance.go
- service_register.go
- session.go
- session_create.go
- session_destroy.go
- session_info.go
- session_list.go
- session_node.go
- session_renew.go
- status.go
- status_leader.go
- status_peers.go
Click to show internal directories.
Click to hide internal directories.