agentpb

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2016 License: Apache-2.0 Imports: 6 Imported by: 33

Documentation

Overview

Package agentpb is a generated protocol buffer package.

It is generated from these files:

agentpb/agent.proto

It has these top-level messages:

StatusRequest
StatusResponse
LocalStatusRequest
LocalStatusResponse
SystemStatus
MemberStatus
NodeStatus
Probe
Timestamp

Copyright 2016 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var MemberStatus_Type_name = map[int32]string{
	0: "None",
	1: "Alive",
	2: "Leaving",
	3: "Left",
	4: "Failed",
}
View Source
var MemberStatus_Type_value = map[string]int32{
	"None":    0,
	"Alive":   1,
	"Leaving": 2,
	"Left":    3,
	"Failed":  4,
}
View Source
var NodeStatus_Type_name = map[int32]string{
	0: "Unknown",
	1: "Running",
	2: "Degraded",
}
View Source
var NodeStatus_Type_value = map[string]int32{
	"Unknown":  0,
	"Running":  1,
	"Degraded": 2,
}
View Source
var Probe_Type_name = map[int32]string{
	0: "Unknown",
	1: "Running",
	2: "Failed",
	3: "Terminated",
}
View Source
var Probe_Type_value = map[string]int32{
	"Unknown":    0,
	"Running":    1,
	"Failed":     2,
	"Terminated": 3,
}
View Source
var SystemStatus_Type_name = map[int32]string{
	0: "Unknown",
	1: "Running",
	2: "Degraded",
}
View Source
var SystemStatus_Type_value = map[string]int32{
	"Unknown":  0,
	"Running":  1,
	"Degraded": 2,
}

Functions

func RegisterAgentServer

func RegisterAgentServer(s *grpc.Server, srv AgentServer)

Types

type AgentClient

type AgentClient interface {
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
	LocalStatus(ctx context.Context, in *LocalStatusRequest, opts ...grpc.CallOption) (*LocalStatusResponse, error)
}

func NewAgentClient

func NewAgentClient(cc *grpc.ClientConn) AgentClient

type AgentServer

type AgentServer interface {
	Status(context.Context, *StatusRequest) (*StatusResponse, error)
	LocalStatus(context.Context, *LocalStatusRequest) (*LocalStatusResponse, error)
}

type LocalStatusRequest

type LocalStatusRequest struct {
}

func (*LocalStatusRequest) Descriptor

func (*LocalStatusRequest) Descriptor() ([]byte, []int)

func (*LocalStatusRequest) ProtoMessage

func (*LocalStatusRequest) ProtoMessage()

func (*LocalStatusRequest) Reset

func (m *LocalStatusRequest) Reset()

func (*LocalStatusRequest) String

func (m *LocalStatusRequest) String() string

type LocalStatusResponse

type LocalStatusResponse struct {
	Status *NodeStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
}

func (*LocalStatusResponse) Descriptor

func (*LocalStatusResponse) Descriptor() ([]byte, []int)

func (*LocalStatusResponse) GetStatus

func (m *LocalStatusResponse) GetStatus() *NodeStatus

func (*LocalStatusResponse) ProtoMessage

func (*LocalStatusResponse) ProtoMessage()

func (*LocalStatusResponse) Reset

func (m *LocalStatusResponse) Reset()

func (*LocalStatusResponse) String

func (m *LocalStatusResponse) String() string

type MemberStatus

type MemberStatus struct {
	Name   string            `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Addr   string            `protobuf:"bytes,2,opt,name=addr" json:"addr,omitempty"`
	Status MemberStatus_Type `protobuf:"varint,3,opt,name=status,enum=agentpb.MemberStatus_Type" json:"status,omitempty"`
	Tags   map[string]string `` /* 128-byte string literal not displayed */
}

MembereStatus represents the status of a member of the serf cluster.

func (*MemberStatus) Descriptor

func (*MemberStatus) Descriptor() ([]byte, []int)

func (*MemberStatus) GetTags

func (m *MemberStatus) GetTags() map[string]string

func (*MemberStatus) ProtoMessage

func (*MemberStatus) ProtoMessage()

func (*MemberStatus) Reset

func (m *MemberStatus) Reset()

func (*MemberStatus) String

func (m *MemberStatus) String() string

type MemberStatus_Type

type MemberStatus_Type int32
const (
	MemberStatus_None    MemberStatus_Type = 0
	MemberStatus_Alive   MemberStatus_Type = 1
	MemberStatus_Leaving MemberStatus_Type = 2
	MemberStatus_Left    MemberStatus_Type = 3
	MemberStatus_Failed  MemberStatus_Type = 4
)

func (MemberStatus_Type) EnumDescriptor

func (MemberStatus_Type) EnumDescriptor() ([]byte, []int)

func (MemberStatus_Type) MarshalText

func (s MemberStatus_Type) MarshalText() (text []byte, err error)

encoding.TextMarshaler

func (MemberStatus_Type) String

func (x MemberStatus_Type) String() string

func (*MemberStatus_Type) UnmarshalText

func (s *MemberStatus_Type) UnmarshalText(text []byte) error

encoding.TextUnmarshaler

type NodeStatus

type NodeStatus struct {
	Name         string          `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	MemberStatus *MemberStatus   `protobuf:"bytes,2,opt,name=member_status" json:"member_status,omitempty"`
	Status       NodeStatus_Type `protobuf:"varint,3,opt,name=status,enum=agentpb.NodeStatus_Type" json:"status,omitempty"`
	// Probes lists all the health probes collected during the health check.
	Probes []*Probe `protobuf:"bytes,4,rep,name=probes" json:"probes,omitempty"`
}

NodeStatus represents a result of a health check for a single node.

func (*NodeStatus) Descriptor

func (*NodeStatus) Descriptor() ([]byte, []int)

func (*NodeStatus) GetMemberStatus

func (m *NodeStatus) GetMemberStatus() *MemberStatus

func (*NodeStatus) GetProbes

func (m *NodeStatus) GetProbes() []*Probe

func (*NodeStatus) ProtoMessage

func (*NodeStatus) ProtoMessage()

func (*NodeStatus) Reset

func (m *NodeStatus) Reset()

func (*NodeStatus) String

func (m *NodeStatus) String() string

type NodeStatus_Type

type NodeStatus_Type int32
const (
	NodeStatus_Unknown  NodeStatus_Type = 0
	NodeStatus_Running  NodeStatus_Type = 1
	NodeStatus_Degraded NodeStatus_Type = 2
)

func (NodeStatus_Type) EnumDescriptor

func (NodeStatus_Type) EnumDescriptor() ([]byte, []int)

func (NodeStatus_Type) MarshalText

func (s NodeStatus_Type) MarshalText() (text []byte, err error)

encoding.TextMarshaler

func (NodeStatus_Type) String

func (x NodeStatus_Type) String() string

func (*NodeStatus_Type) UnmarshalText

func (s *NodeStatus_Type) UnmarshalText(text []byte) error

encoding.TextUnmarshaler

type Probe

type Probe struct {
	// Name of the checker that generated the probe.
	Checker string `protobuf:"bytes,1,opt,name=checker" json:"checker,omitempty"`
	// Optional detail specific to the checker
	Detail string `protobuf:"bytes,2,opt,name=detail" json:"detail,omitempty"`
	// Optional code specific to a checker (i.e. HTTP status code)
	Code   string     `protobuf:"bytes,3,opt,name=code" json:"code,omitempty"`
	Status Probe_Type `protobuf:"varint,4,opt,name=status,enum=agentpb.Probe_Type" json:"status,omitempty"`
	Error  string     `protobuf:"bytes,5,opt,name=error" json:"error,omitempty"`
}

func (*Probe) Descriptor

func (*Probe) Descriptor() ([]byte, []int)

func (*Probe) ProtoMessage

func (*Probe) ProtoMessage()

func (*Probe) Reset

func (m *Probe) Reset()

func (*Probe) String

func (m *Probe) String() string

type Probe_Type

type Probe_Type int32
const (
	Probe_Unknown    Probe_Type = 0
	Probe_Running    Probe_Type = 1
	Probe_Failed     Probe_Type = 2
	Probe_Terminated Probe_Type = 3
)

func (Probe_Type) EnumDescriptor

func (Probe_Type) EnumDescriptor() ([]byte, []int)

func (Probe_Type) MarshalText

func (s Probe_Type) MarshalText() (text []byte, err error)

encoding.TextMarshaler

func (Probe_Type) String

func (x Probe_Type) String() string

func (*Probe_Type) UnmarshalText

func (s *Probe_Type) UnmarshalText(text []byte) error

encoding.TextUnmarshaler

type StatusRequest

type StatusRequest struct {
}

func (*StatusRequest) Descriptor

func (*StatusRequest) Descriptor() ([]byte, []int)

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) Reset

func (m *StatusRequest) Reset()

func (*StatusRequest) String

func (m *StatusRequest) String() string

type StatusResponse

type StatusResponse struct {
	Status *SystemStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
}

func (*StatusResponse) Descriptor

func (*StatusResponse) Descriptor() ([]byte, []int)

func (*StatusResponse) GetStatus

func (m *StatusResponse) GetStatus() *SystemStatus

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) Reset

func (m *StatusResponse) Reset()

func (*StatusResponse) String

func (m *StatusResponse) String() string

type SystemStatus

type SystemStatus struct {
	Status SystemStatus_Type `protobuf:"varint,1,opt,name=status,enum=agentpb.SystemStatus_Type" json:"status,omitempty"`
	// Health status of individual nodes.
	Nodes     []*NodeStatus `protobuf:"bytes,2,rep,name=nodes" json:"nodes,omitempty"`
	Timestamp *Timestamp    `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp,omitempty"`
	// Human-readable status summary.
	Summary string `protobuf:"bytes,4,opt,name=summary" json:"summary,omitempty"`
}

System describes the health status of the cluster.

func (*SystemStatus) Descriptor

func (*SystemStatus) Descriptor() ([]byte, []int)

func (*SystemStatus) GetNodes

func (m *SystemStatus) GetNodes() []*NodeStatus

func (*SystemStatus) GetTimestamp

func (m *SystemStatus) GetTimestamp() *Timestamp

func (*SystemStatus) ProtoMessage

func (*SystemStatus) ProtoMessage()

func (*SystemStatus) Reset

func (m *SystemStatus) Reset()

func (*SystemStatus) String

func (m *SystemStatus) String() string

type SystemStatus_Type

type SystemStatus_Type int32
const (
	SystemStatus_Unknown  SystemStatus_Type = 0
	SystemStatus_Running  SystemStatus_Type = 1
	SystemStatus_Degraded SystemStatus_Type = 2
)

func (SystemStatus_Type) EnumDescriptor

func (SystemStatus_Type) EnumDescriptor() ([]byte, []int)

func (SystemStatus_Type) MarshalText

func (s SystemStatus_Type) MarshalText() (text []byte, err error)

encoding.TextMarshaler

func (SystemStatus_Type) String

func (x SystemStatus_Type) String() string

func (*SystemStatus_Type) UnmarshalText

func (s *SystemStatus_Type) UnmarshalText(text []byte) error

encoding.TextUnmarshaler

type Timestamp

type Timestamp struct {
	Seconds     int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
	Nanoseconds int32 `protobuf:"varint,2,opt,name=nanoseconds" json:"nanoseconds,omitempty"`
}

func NewTimeToProto

func NewTimeToProto(t time.Time) *Timestamp

NewTimeToProto is like TimeToProto but returns a pointer result instead.

func NewTimestamp

func NewTimestamp() *Timestamp

NewTimestamp returns a timestamp set to current time.

func TimeToProto

func TimeToProto(t time.Time) Timestamp

TimeToTime creates a new instance of Timestamp from the given time.Time value.

func (*Timestamp) Clone

func (ts *Timestamp) Clone() (result *Timestamp)

Clone returns a copy of this timestamp.

func (*Timestamp) Descriptor

func (*Timestamp) Descriptor() ([]byte, []int)

func (Timestamp) Equal

func (ts Timestamp) Equal(other Timestamp) bool

Equal compares this timestamp with other to determine if they're equal.

func (Timestamp) MarshalText

func (ts Timestamp) MarshalText() (text []byte, err error)

encoding.TextMarshaler

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) Reset

func (m *Timestamp) Reset()

func (*Timestamp) String

func (m *Timestamp) String() string

func (Timestamp) ToTime

func (ts Timestamp) ToTime() time.Time

ToTime converts this timestamp to time.Time value.

func (*Timestamp) UnmarshalText

func (ts *Timestamp) UnmarshalText(text []byte) error

encoding.TextUnmarshaler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL