agentpb

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAgent = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAgent   = fmt.Errorf("proto: integer overflow")
)
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) 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) Descriptor() ([]byte, []int)

func (*Probe) Marshal added in v0.0.7

func (m *Probe) Marshal() (data []byte, err error)

func (*Probe) MarshalTo added in v0.0.7

func (m *Probe) MarshalTo(data []byte) (int, error)

func (*Probe) ProtoMessage

func (*Probe) ProtoMessage()

func (*Probe) Reset

func (m *Probe) Reset()

func (*Probe) Size added in v0.0.7

func (m *Probe) Size() (n int)

func (*Probe) String

func (m *Probe) String() string

func (*Probe) Unmarshal added in v0.0.7

func (m *Probe) Unmarshal(data []byte) error

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

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) Marshal added in v0.0.7

func (m *Timestamp) Marshal() (data []byte, err error)

func (Timestamp) MarshalText

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

encoding.TextMarshaler

func (*Timestamp) MarshalTo added in v0.0.7

func (m *Timestamp) MarshalTo(data []byte) (int, error)

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) Reset

func (m *Timestamp) Reset()

func (*Timestamp) Size added in v0.0.7

func (m *Timestamp) Size() (n int)

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) Unmarshal added in v0.0.7

func (m *Timestamp) Unmarshal(data []byte) error

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