Documentation ¶
Overview ¶
Package agentpb is a generated protocol buffer package. It is generated from these files: agent.proto It has these top-level messages: StatusRequest StatusResponse LocalStatusRequest LocalStatusResponse SystemStatus MemberStatus NodeStatus Probe Timestamp
This file implements JSON encoding/decoding for status types
Index ¶
- Variables
- func RegisterAgentServer(s *grpc.Server, srv AgentServer)
- type AgentClient
- type AgentServer
- type LocalStatusRequest
- func (*LocalStatusRequest) Descriptor() ([]byte, []int)
- func (m *LocalStatusRequest) Marshal() (data []byte, err error)
- func (m *LocalStatusRequest) MarshalTo(data []byte) (int, error)
- func (*LocalStatusRequest) ProtoMessage()
- func (m *LocalStatusRequest) Reset()
- func (m *LocalStatusRequest) Size() (n int)
- func (m *LocalStatusRequest) String() string
- func (m *LocalStatusRequest) Unmarshal(data []byte) error
- type LocalStatusResponse
- func (*LocalStatusResponse) Descriptor() ([]byte, []int)
- func (m *LocalStatusResponse) GetStatus() *NodeStatus
- func (m *LocalStatusResponse) Marshal() (data []byte, err error)
- func (m *LocalStatusResponse) MarshalTo(data []byte) (int, error)
- func (*LocalStatusResponse) ProtoMessage()
- func (m *LocalStatusResponse) Reset()
- func (m *LocalStatusResponse) Size() (n int)
- func (m *LocalStatusResponse) String() string
- func (m *LocalStatusResponse) Unmarshal(data []byte) error
- type MemberStatus
- func (r *MemberStatus) Clone() (status *MemberStatus)
- func (*MemberStatus) Descriptor() ([]byte, []int)
- func (m *MemberStatus) GetTags() map[string]string
- func (m *MemberStatus) Marshal() (data []byte, err error)
- func (m *MemberStatus) MarshalTo(data []byte) (int, error)
- func (*MemberStatus) ProtoMessage()
- func (m *MemberStatus) Reset()
- func (m *MemberStatus) Size() (n int)
- func (m *MemberStatus) String() string
- func (m *MemberStatus) Unmarshal(data []byte) error
- type MemberStatus_Type
- type NodeStatus
- func (r *NodeStatus) Clone() (status *NodeStatus)
- func (*NodeStatus) Descriptor() ([]byte, []int)
- func (m *NodeStatus) GetMemberStatus() *MemberStatus
- func (m *NodeStatus) GetProbes() []*Probe
- func (m *NodeStatus) Marshal() (data []byte, err error)
- func (m *NodeStatus) MarshalTo(data []byte) (int, error)
- func (*NodeStatus) ProtoMessage()
- func (m *NodeStatus) Reset()
- func (m *NodeStatus) Size() (n int)
- func (m *NodeStatus) String() string
- func (m *NodeStatus) Unmarshal(data []byte) error
- type NodeStatus_Type
- type Probe
- func (*Probe) Descriptor() ([]byte, []int)
- func (m *Probe) Marshal() (data []byte, err error)
- func (m *Probe) MarshalTo(data []byte) (int, error)
- func (*Probe) ProtoMessage()
- func (m *Probe) Reset()
- func (m *Probe) Size() (n int)
- func (m *Probe) String() string
- func (m *Probe) Unmarshal(data []byte) error
- type Probe_Type
- type StatusRequest
- func (*StatusRequest) Descriptor() ([]byte, []int)
- func (m *StatusRequest) Marshal() (data []byte, err error)
- func (m *StatusRequest) MarshalTo(data []byte) (int, error)
- func (*StatusRequest) ProtoMessage()
- func (m *StatusRequest) Reset()
- func (m *StatusRequest) Size() (n int)
- func (m *StatusRequest) String() string
- func (m *StatusRequest) Unmarshal(data []byte) error
- type StatusResponse
- func (*StatusResponse) Descriptor() ([]byte, []int)
- func (m *StatusResponse) GetStatus() *SystemStatus
- func (m *StatusResponse) Marshal() (data []byte, err error)
- func (m *StatusResponse) MarshalTo(data []byte) (int, error)
- func (*StatusResponse) ProtoMessage()
- func (m *StatusResponse) Reset()
- func (m *StatusResponse) Size() (n int)
- func (m *StatusResponse) String() string
- func (m *StatusResponse) Unmarshal(data []byte) error
- type SystemStatus
- func (r *SystemStatus) Clone() (status *SystemStatus)
- func (*SystemStatus) Descriptor() ([]byte, []int)
- func (m *SystemStatus) GetNodes() []*NodeStatus
- func (m *SystemStatus) GetTimestamp() *Timestamp
- func (m *SystemStatus) Marshal() (data []byte, err error)
- func (m *SystemStatus) MarshalTo(data []byte) (int, error)
- func (*SystemStatus) ProtoMessage()
- func (m *SystemStatus) Reset()
- func (m *SystemStatus) Size() (n int)
- func (m *SystemStatus) String() string
- func (m *SystemStatus) Unmarshal(data []byte) error
- type SystemStatus_Type
- type Timestamp
- func (ts *Timestamp) Clone() (result *Timestamp)
- func (*Timestamp) Descriptor() ([]byte, []int)
- func (ts Timestamp) Equal(other Timestamp) bool
- func (m *Timestamp) Marshal() (data []byte, err error)
- func (ts Timestamp) MarshalText() (text []byte, err error)
- func (m *Timestamp) MarshalTo(data []byte) (int, error)
- func (*Timestamp) ProtoMessage()
- func (m *Timestamp) Reset()
- func (m *Timestamp) Size() (n int)
- func (m *Timestamp) String() string
- func (ts Timestamp) ToTime() time.Time
- func (m *Timestamp) Unmarshal(data []byte) error
- func (ts *Timestamp) UnmarshalText(text []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthAgent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAgent = fmt.Errorf("proto: integer overflow") )
var MemberStatus_Type_name = map[int32]string{
0: "None",
1: "Alive",
2: "Leaving",
3: "Left",
4: "Failed",
}
var MemberStatus_Type_value = map[string]int32{
"None": 0,
"Alive": 1,
"Leaving": 2,
"Left": 3,
"Failed": 4,
}
var NodeStatus_Type_name = map[int32]string{
0: "Unknown",
1: "Running",
2: "Degraded",
}
var NodeStatus_Type_value = map[string]int32{
"Unknown": 0,
"Running": 1,
"Degraded": 2,
}
var Probe_Type_name = map[int32]string{
0: "Unknown",
1: "Running",
2: "Failed",
3: "Terminated",
}
var Probe_Type_value = map[string]int32{
"Unknown": 0,
"Running": 1,
"Failed": 2,
"Terminated": 3,
}
var SystemStatus_Type_name = map[int32]string{
0: "Unknown",
1: "Running",
2: "Degraded",
}
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) Marshal ¶ added in v0.0.7
func (m *LocalStatusRequest) Marshal() (data []byte, err error)
func (*LocalStatusRequest) MarshalTo ¶ added in v0.0.7
func (m *LocalStatusRequest) MarshalTo(data []byte) (int, error)
func (*LocalStatusRequest) ProtoMessage ¶
func (*LocalStatusRequest) ProtoMessage()
func (*LocalStatusRequest) Reset ¶
func (m *LocalStatusRequest) Reset()
func (*LocalStatusRequest) Size ¶ added in v0.0.7
func (m *LocalStatusRequest) Size() (n int)
func (*LocalStatusRequest) String ¶
func (m *LocalStatusRequest) String() string
func (*LocalStatusRequest) Unmarshal ¶ added in v0.0.7
func (m *LocalStatusRequest) Unmarshal(data []byte) error
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) Marshal ¶ added in v0.0.7
func (m *LocalStatusResponse) Marshal() (data []byte, err error)
func (*LocalStatusResponse) MarshalTo ¶ added in v0.0.7
func (m *LocalStatusResponse) MarshalTo(data []byte) (int, error)
func (*LocalStatusResponse) ProtoMessage ¶
func (*LocalStatusResponse) ProtoMessage()
func (*LocalStatusResponse) Reset ¶
func (m *LocalStatusResponse) Reset()
func (*LocalStatusResponse) Size ¶ added in v0.0.7
func (m *LocalStatusResponse) Size() (n int)
func (*LocalStatusResponse) String ¶
func (m *LocalStatusResponse) String() string
func (*LocalStatusResponse) Unmarshal ¶ added in v0.0.7
func (m *LocalStatusResponse) Unmarshal(data []byte) error
type MemberStatus ¶
type MemberStatus struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` Status MemberStatus_Type `protobuf:"varint,3,opt,name=status,proto3,enum=agentpb.MemberStatus_Type" json:"status,omitempty"` Tags map[string]string `` /* 142-byte string literal not displayed */ }
MembereStatus represents the status of a member of the serf cluster.
func (*MemberStatus) Clone ¶ added in v0.0.7
func (r *MemberStatus) Clone() (status *MemberStatus)
Clone creates a deep-copy of this MemberStatus
func (*MemberStatus) Descriptor ¶
func (*MemberStatus) Descriptor() ([]byte, []int)
func (*MemberStatus) GetTags ¶
func (m *MemberStatus) GetTags() map[string]string
func (*MemberStatus) Marshal ¶ added in v0.0.7
func (m *MemberStatus) Marshal() (data []byte, err error)
func (*MemberStatus) MarshalTo ¶ added in v0.0.7
func (m *MemberStatus) MarshalTo(data []byte) (int, error)
func (*MemberStatus) ProtoMessage ¶
func (*MemberStatus) ProtoMessage()
func (*MemberStatus) Reset ¶
func (m *MemberStatus) Reset()
func (*MemberStatus) Size ¶ added in v0.0.7
func (m *MemberStatus) Size() (n int)
func (*MemberStatus) String ¶
func (m *MemberStatus) String() string
func (*MemberStatus) Unmarshal ¶ added in v0.0.7
func (m *MemberStatus) Unmarshal(data []byte) error
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,proto3" json:"name,omitempty"` MemberStatus *MemberStatus `protobuf:"bytes,2,opt,name=member_status,json=memberStatus" json:"member_status,omitempty"` Status NodeStatus_Type `protobuf:"varint,3,opt,name=status,proto3,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) Clone ¶ added in v0.0.7
func (r *NodeStatus) Clone() (status *NodeStatus)
Clone creates a deep-copy of this NodeStatus
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) Marshal ¶ added in v0.0.7
func (m *NodeStatus) Marshal() (data []byte, err error)
func (*NodeStatus) MarshalTo ¶ added in v0.0.7
func (m *NodeStatus) MarshalTo(data []byte) (int, error)
func (*NodeStatus) ProtoMessage ¶
func (*NodeStatus) ProtoMessage()
func (*NodeStatus) Reset ¶
func (m *NodeStatus) Reset()
func (*NodeStatus) Size ¶ added in v0.0.7
func (m *NodeStatus) Size() (n int)
func (*NodeStatus) String ¶
func (m *NodeStatus) String() string
func (*NodeStatus) Unmarshal ¶ added in v0.0.7
func (m *NodeStatus) Unmarshal(data []byte) error
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,proto3" json:"checker,omitempty"` // Optional detail specific to the checker Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"` // Optional code specific to a checker (i.e. HTTP status code) Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` Status Probe_Type `protobuf:"varint,4,opt,name=status,proto3,enum=agentpb.Probe_Type" json:"status,omitempty"` Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` }
func (*Probe) Descriptor ¶
func (*Probe) ProtoMessage ¶
func (*Probe) ProtoMessage()
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) Marshal ¶ added in v0.0.7
func (m *StatusRequest) Marshal() (data []byte, err error)
func (*StatusRequest) MarshalTo ¶ added in v0.0.7
func (m *StatusRequest) MarshalTo(data []byte) (int, error)
func (*StatusRequest) ProtoMessage ¶
func (*StatusRequest) ProtoMessage()
func (*StatusRequest) Reset ¶
func (m *StatusRequest) Reset()
func (*StatusRequest) Size ¶ added in v0.0.7
func (m *StatusRequest) Size() (n int)
func (*StatusRequest) String ¶
func (m *StatusRequest) String() string
func (*StatusRequest) Unmarshal ¶ added in v0.0.7
func (m *StatusRequest) Unmarshal(data []byte) error
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) Marshal ¶ added in v0.0.7
func (m *StatusResponse) Marshal() (data []byte, err error)
func (*StatusResponse) MarshalTo ¶ added in v0.0.7
func (m *StatusResponse) MarshalTo(data []byte) (int, error)
func (*StatusResponse) ProtoMessage ¶
func (*StatusResponse) ProtoMessage()
func (*StatusResponse) Reset ¶
func (m *StatusResponse) Reset()
func (*StatusResponse) Size ¶ added in v0.0.7
func (m *StatusResponse) Size() (n int)
func (*StatusResponse) String ¶
func (m *StatusResponse) String() string
func (*StatusResponse) Unmarshal ¶ added in v0.0.7
func (m *StatusResponse) Unmarshal(data []byte) error
type SystemStatus ¶
type SystemStatus struct { Status SystemStatus_Type `protobuf:"varint,1,opt,name=status,proto3,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,proto3" json:"summary,omitempty"` }
System describes the health status of the cluster.
func EmptyStatus ¶ added in v0.0.7
func EmptyStatus() *SystemStatus
EmptyStatus returns an empty system status
func (*SystemStatus) Clone ¶ added in v0.0.7
func (r *SystemStatus) Clone() (status *SystemStatus)
Clone creates a deep-copy of this SystemStatus
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) Marshal ¶ added in v0.0.7
func (m *SystemStatus) Marshal() (data []byte, err error)
func (*SystemStatus) MarshalTo ¶ added in v0.0.7
func (m *SystemStatus) MarshalTo(data []byte) (int, error)
func (*SystemStatus) ProtoMessage ¶
func (*SystemStatus) ProtoMessage()
func (*SystemStatus) Reset ¶
func (m *SystemStatus) Reset()
func (*SystemStatus) Size ¶ added in v0.0.7
func (m *SystemStatus) Size() (n int)
func (*SystemStatus) String ¶
func (m *SystemStatus) String() string
func (*SystemStatus) Unmarshal ¶ added in v0.0.7
func (m *SystemStatus) Unmarshal(data []byte) error
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,proto3" json:"seconds,omitempty"` Nanoseconds int32 `protobuf:"varint,2,opt,name=nanoseconds,proto3" json:"nanoseconds,omitempty"` }
func NewTimeToProto ¶
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 ¶
TimeToTime creates a new instance of Timestamp from the given time.Time value.
func (*Timestamp) Descriptor ¶
func (Timestamp) MarshalText ¶
encoding.TextMarshaler
func (*Timestamp) ProtoMessage ¶
func (*Timestamp) ProtoMessage()
func (*Timestamp) UnmarshalText ¶
encoding.TextUnmarshaler