Documentation

Overview

    Package cluster is a reverse proxy.

    It translates gRPC into RESTful JSON APIs.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func RegisterClusterHandler

    func RegisterClusterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

      RegisterClusterHandler registers the http handlers for service Cluster to "mux". The handlers forward requests to the grpc endpoint over "conn".

      func RegisterClusterHandlerClient

      func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClusterClient) error

        RegisterClusterHandlerClient registers the http handlers for service Cluster to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ClusterClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ClusterClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ClusterClient" to call the correct interceptors.

        func RegisterClusterHandlerFromEndpoint

        func RegisterClusterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

          RegisterClusterHandlerFromEndpoint is same as RegisterClusterHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

          func RegisterClusterServer

          func RegisterClusterServer(s *grpc.Server, srv ClusterServer)

          Types

          type ClusterClient

          type ClusterClient interface {
          	Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
          	Containers(ctx context.Context, in *ContainersRequest, opts ...grpc.CallOption) (*ContainersResponse, error)
          	Images(ctx context.Context, in *ImagesRequest, opts ...grpc.CallOption) (*ImagesResponse, error)
          	Nodes(ctx context.Context, in *NodesRequest, opts ...grpc.CallOption) (*NodesResponse, error)
          	Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error)
          }

            ClusterClient is the client API for Cluster service.

            For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

            func NewClusterClient

            func NewClusterClient(cc *grpc.ClientConn) ClusterClient

            type ClusterServer

              ClusterServer is the server API for Cluster service.

              type Container

              type Container struct {
              	Container            *v1.Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"`
              	Node                 *Node         `protobuf:"bytes,2,opt,name=node" json:"node,omitempty"`
              	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
              	XXX_unrecognized     []byte        `json:"-"`
              	XXX_sizecache        int32         `json:"-"`
              }

              func (*Container) Descriptor

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

              func (*Container) GetContainer

              func (m *Container) GetContainer() *v1.Container

              func (*Container) GetNode

              func (m *Container) GetNode() *Node

              func (*Container) ProtoMessage

              func (*Container) ProtoMessage()

              func (*Container) Reset

              func (m *Container) Reset()

              func (*Container) String

              func (m *Container) String() string

              func (*Container) XXX_DiscardUnknown

              func (m *Container) XXX_DiscardUnknown()

              func (*Container) XXX_Marshal

              func (m *Container) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*Container) XXX_Merge

              func (dst *Container) XXX_Merge(src proto.Message)

              func (*Container) XXX_Size

              func (m *Container) XXX_Size() int

              func (*Container) XXX_Unmarshal

              func (m *Container) XXX_Unmarshal(b []byte) error

              type ContainersRequest

              type ContainersRequest struct {
              	Filters              []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"`
              	XXX_NoUnkeyedLiteral struct{} `json:"-"`
              	XXX_unrecognized     []byte   `json:"-"`
              	XXX_sizecache        int32    `json:"-"`
              }

              func (*ContainersRequest) Descriptor

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

              func (*ContainersRequest) GetFilters

              func (m *ContainersRequest) GetFilters() []string

              func (*ContainersRequest) ProtoMessage

              func (*ContainersRequest) ProtoMessage()

              func (*ContainersRequest) Reset

              func (m *ContainersRequest) Reset()

              func (*ContainersRequest) String

              func (m *ContainersRequest) String() string

              func (*ContainersRequest) XXX_DiscardUnknown

              func (m *ContainersRequest) XXX_DiscardUnknown()

              func (*ContainersRequest) XXX_Marshal

              func (m *ContainersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*ContainersRequest) XXX_Merge

              func (dst *ContainersRequest) XXX_Merge(src proto.Message)

              func (*ContainersRequest) XXX_Size

              func (m *ContainersRequest) XXX_Size() int

              func (*ContainersRequest) XXX_Unmarshal

              func (m *ContainersRequest) XXX_Unmarshal(b []byte) error

              type ContainersResponse

              type ContainersResponse struct {
              	Containers           []*Container `protobuf:"bytes,1,rep,name=containers" json:"containers,omitempty"`
              	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
              	XXX_unrecognized     []byte       `json:"-"`
              	XXX_sizecache        int32        `json:"-"`
              }

              func (*ContainersResponse) Descriptor

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

              func (*ContainersResponse) GetContainers

              func (m *ContainersResponse) GetContainers() []*Container

              func (*ContainersResponse) ProtoMessage

              func (*ContainersResponse) ProtoMessage()

              func (*ContainersResponse) Reset

              func (m *ContainersResponse) Reset()

              func (*ContainersResponse) String

              func (m *ContainersResponse) String() string

              func (*ContainersResponse) XXX_DiscardUnknown

              func (m *ContainersResponse) XXX_DiscardUnknown()

              func (*ContainersResponse) XXX_Marshal

              func (m *ContainersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*ContainersResponse) XXX_Merge

              func (dst *ContainersResponse) XXX_Merge(src proto.Message)

              func (*ContainersResponse) XXX_Size

              func (m *ContainersResponse) XXX_Size() int

              func (*ContainersResponse) XXX_Unmarshal

              func (m *ContainersResponse) XXX_Unmarshal(b []byte) error

              type HealthRequest

              type HealthRequest struct {
              	XXX_NoUnkeyedLiteral struct{} `json:"-"`
              	XXX_unrecognized     []byte   `json:"-"`
              	XXX_sizecache        int32    `json:"-"`
              }

              func (*HealthRequest) Descriptor

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

              func (*HealthRequest) ProtoMessage

              func (*HealthRequest) ProtoMessage()

              func (*HealthRequest) Reset

              func (m *HealthRequest) Reset()

              func (*HealthRequest) String

              func (m *HealthRequest) String() string

              func (*HealthRequest) XXX_DiscardUnknown

              func (m *HealthRequest) XXX_DiscardUnknown()

              func (*HealthRequest) XXX_Marshal

              func (m *HealthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*HealthRequest) XXX_Merge

              func (dst *HealthRequest) XXX_Merge(src proto.Message)

              func (*HealthRequest) XXX_Size

              func (m *HealthRequest) XXX_Size() int

              func (*HealthRequest) XXX_Unmarshal

              func (m *HealthRequest) XXX_Unmarshal(b []byte) error

              type HealthResponse

              type HealthResponse struct {
              	Nodes                []*NodeHealth `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
              	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
              	XXX_unrecognized     []byte        `json:"-"`
              	XXX_sizecache        int32         `json:"-"`
              }

              func (*HealthResponse) Descriptor

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

              func (*HealthResponse) GetNodes

              func (m *HealthResponse) GetNodes() []*NodeHealth

              func (*HealthResponse) ProtoMessage

              func (*HealthResponse) ProtoMessage()

              func (*HealthResponse) Reset

              func (m *HealthResponse) Reset()

              func (*HealthResponse) String

              func (m *HealthResponse) String() string

              func (*HealthResponse) XXX_DiscardUnknown

              func (m *HealthResponse) XXX_DiscardUnknown()

              func (*HealthResponse) XXX_Marshal

              func (m *HealthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*HealthResponse) XXX_Merge

              func (dst *HealthResponse) XXX_Merge(src proto.Message)

              func (*HealthResponse) XXX_Size

              func (m *HealthResponse) XXX_Size() int

              func (*HealthResponse) XXX_Unmarshal

              func (m *HealthResponse) XXX_Unmarshal(b []byte) error

              type ImagesRequest

              type ImagesRequest struct {
              	XXX_NoUnkeyedLiteral struct{} `json:"-"`
              	XXX_unrecognized     []byte   `json:"-"`
              	XXX_sizecache        int32    `json:"-"`
              }

              func (*ImagesRequest) Descriptor

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

              func (*ImagesRequest) ProtoMessage

              func (*ImagesRequest) ProtoMessage()

              func (*ImagesRequest) Reset

              func (m *ImagesRequest) Reset()

              func (*ImagesRequest) String

              func (m *ImagesRequest) String() string

              func (*ImagesRequest) XXX_DiscardUnknown

              func (m *ImagesRequest) XXX_DiscardUnknown()

              func (*ImagesRequest) XXX_Marshal

              func (m *ImagesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*ImagesRequest) XXX_Merge

              func (dst *ImagesRequest) XXX_Merge(src proto.Message)

              func (*ImagesRequest) XXX_Size

              func (m *ImagesRequest) XXX_Size() int

              func (*ImagesRequest) XXX_Unmarshal

              func (m *ImagesRequest) XXX_Unmarshal(b []byte) error

              type ImagesResponse

              type ImagesResponse struct {
              	Images               []*v1.Image `protobuf:"bytes,1,rep,name=images" json:"images,omitempty"`
              	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
              	XXX_unrecognized     []byte      `json:"-"`
              	XXX_sizecache        int32       `json:"-"`
              }

              func (*ImagesResponse) Descriptor

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

              func (*ImagesResponse) GetImages

              func (m *ImagesResponse) GetImages() []*v1.Image

              func (*ImagesResponse) ProtoMessage

              func (*ImagesResponse) ProtoMessage()

              func (*ImagesResponse) Reset

              func (m *ImagesResponse) Reset()

              func (*ImagesResponse) String

              func (m *ImagesResponse) String() string

              func (*ImagesResponse) XXX_DiscardUnknown

              func (m *ImagesResponse) XXX_DiscardUnknown()

              func (*ImagesResponse) XXX_Marshal

              func (m *ImagesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*ImagesResponse) XXX_Merge

              func (dst *ImagesResponse) XXX_Merge(src proto.Message)

              func (*ImagesResponse) XXX_Size

              func (m *ImagesResponse) XXX_Size() int

              func (*ImagesResponse) XXX_Unmarshal

              func (m *ImagesResponse) XXX_Unmarshal(b []byte) error

              type InfoRequest

              type InfoRequest struct {
              	XXX_NoUnkeyedLiteral struct{} `json:"-"`
              	XXX_unrecognized     []byte   `json:"-"`
              	XXX_sizecache        int32    `json:"-"`
              }

              func (*InfoRequest) Descriptor

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

              func (*InfoRequest) ProtoMessage

              func (*InfoRequest) ProtoMessage()

              func (*InfoRequest) Reset

              func (m *InfoRequest) Reset()

              func (*InfoRequest) String

              func (m *InfoRequest) String() string

              func (*InfoRequest) XXX_DiscardUnknown

              func (m *InfoRequest) XXX_DiscardUnknown()

              func (*InfoRequest) XXX_Marshal

              func (m *InfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*InfoRequest) XXX_Merge

              func (dst *InfoRequest) XXX_Merge(src proto.Message)

              func (*InfoRequest) XXX_Size

              func (m *InfoRequest) XXX_Size() int

              func (*InfoRequest) XXX_Unmarshal

              func (m *InfoRequest) XXX_Unmarshal(b []byte) error

              type InfoResponse

              type InfoResponse struct {
              	ID                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
              	XXX_NoUnkeyedLiteral struct{} `json:"-"`
              	XXX_unrecognized     []byte   `json:"-"`
              	XXX_sizecache        int32    `json:"-"`
              }

              func (*InfoResponse) Descriptor

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

              func (*InfoResponse) GetID

              func (m *InfoResponse) GetID() string

              func (*InfoResponse) ProtoMessage

              func (*InfoResponse) ProtoMessage()

              func (*InfoResponse) Reset

              func (m *InfoResponse) Reset()

              func (*InfoResponse) String

              func (m *InfoResponse) String() string

              func (*InfoResponse) XXX_DiscardUnknown

              func (m *InfoResponse) XXX_DiscardUnknown()

              func (*InfoResponse) XXX_Marshal

              func (m *InfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*InfoResponse) XXX_Merge

              func (dst *InfoResponse) XXX_Merge(src proto.Message)

              func (*InfoResponse) XXX_Size

              func (m *InfoResponse) XXX_Size() int

              func (*InfoResponse) XXX_Unmarshal

              func (m *InfoResponse) XXX_Unmarshal(b []byte) error

              type Node

              type Node struct {
              	ID                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
              	Address              string   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
              	XXX_NoUnkeyedLiteral struct{} `json:"-"`
              	XXX_unrecognized     []byte   `json:"-"`
              	XXX_sizecache        int32    `json:"-"`
              }

              func (*Node) Descriptor

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

              func (*Node) GetAddress

              func (m *Node) GetAddress() string

              func (*Node) GetID

              func (m *Node) GetID() string

              func (*Node) ProtoMessage

              func (*Node) ProtoMessage()

              func (*Node) Reset

              func (m *Node) Reset()

              func (*Node) String

              func (m *Node) String() string

              func (*Node) XXX_DiscardUnknown

              func (m *Node) XXX_DiscardUnknown()

              func (*Node) XXX_Marshal

              func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*Node) XXX_Merge

              func (dst *Node) XXX_Merge(src proto.Message)

              func (*Node) XXX_Size

              func (m *Node) XXX_Size() int

              func (*Node) XXX_Unmarshal

              func (m *Node) XXX_Unmarshal(b []byte) error

              type NodeHealth

              type NodeHealth struct {
              	Node                 *Node           `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"`
              	Health               *v11.NodeHealth `protobuf:"bytes,2,opt,name=health" json:"health,omitempty"`
              	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
              	XXX_unrecognized     []byte          `json:"-"`
              	XXX_sizecache        int32           `json:"-"`
              }

              func (*NodeHealth) Descriptor

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

              func (*NodeHealth) GetHealth

              func (m *NodeHealth) GetHealth() *v11.NodeHealth

              func (*NodeHealth) GetNode

              func (m *NodeHealth) GetNode() *Node

              func (*NodeHealth) ProtoMessage

              func (*NodeHealth) ProtoMessage()

              func (*NodeHealth) Reset

              func (m *NodeHealth) Reset()

              func (*NodeHealth) String

              func (m *NodeHealth) String() string

              func (*NodeHealth) XXX_DiscardUnknown

              func (m *NodeHealth) XXX_DiscardUnknown()

              func (*NodeHealth) XXX_Marshal

              func (m *NodeHealth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*NodeHealth) XXX_Merge

              func (dst *NodeHealth) XXX_Merge(src proto.Message)

              func (*NodeHealth) XXX_Size

              func (m *NodeHealth) XXX_Size() int

              func (*NodeHealth) XXX_Unmarshal

              func (m *NodeHealth) XXX_Unmarshal(b []byte) error

              type NodesRequest

              type NodesRequest struct {
              	XXX_NoUnkeyedLiteral struct{} `json:"-"`
              	XXX_unrecognized     []byte   `json:"-"`
              	XXX_sizecache        int32    `json:"-"`
              }

              func (*NodesRequest) Descriptor

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

              func (*NodesRequest) ProtoMessage

              func (*NodesRequest) ProtoMessage()

              func (*NodesRequest) Reset

              func (m *NodesRequest) Reset()

              func (*NodesRequest) String

              func (m *NodesRequest) String() string

              func (*NodesRequest) XXX_DiscardUnknown

              func (m *NodesRequest) XXX_DiscardUnknown()

              func (*NodesRequest) XXX_Marshal

              func (m *NodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*NodesRequest) XXX_Merge

              func (dst *NodesRequest) XXX_Merge(src proto.Message)

              func (*NodesRequest) XXX_Size

              func (m *NodesRequest) XXX_Size() int

              func (*NodesRequest) XXX_Unmarshal

              func (m *NodesRequest) XXX_Unmarshal(b []byte) error

              type NodesResponse

              type NodesResponse struct {
              	Nodes                []*Node  `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
              	XXX_NoUnkeyedLiteral struct{} `json:"-"`
              	XXX_unrecognized     []byte   `json:"-"`
              	XXX_sizecache        int32    `json:"-"`
              }

              func (*NodesResponse) Descriptor

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

              func (*NodesResponse) GetNodes

              func (m *NodesResponse) GetNodes() []*Node

              func (*NodesResponse) ProtoMessage

              func (*NodesResponse) ProtoMessage()

              func (*NodesResponse) Reset

              func (m *NodesResponse) Reset()

              func (*NodesResponse) String

              func (m *NodesResponse) String() string

              func (*NodesResponse) XXX_DiscardUnknown

              func (m *NodesResponse) XXX_DiscardUnknown()

              func (*NodesResponse) XXX_Marshal

              func (m *NodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

              func (*NodesResponse) XXX_Merge

              func (dst *NodesResponse) XXX_Merge(src proto.Message)

              func (*NodesResponse) XXX_Size

              func (m *NodesResponse) XXX_Size() int

              func (*NodesResponse) XXX_Unmarshal

              func (m *NodesResponse) XXX_Unmarshal(b []byte) error