cluster

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: Apache-2.0 Imports: 22 Imported by: 6

Documentation

Overview

Package cluster is a generated protocol buffer package.

It is generated from these files:

github.com/appcelerator/amp/api/rpc/cluster/cluster.proto

It has these top-level messages:

CreateRequest
CreateReply
ListRequest
ListReply
InfoRequest
InfoReply
StatusRequest
StatusReply
UpdateRequest
UpdateReply
RemoveRequest
RemoveReply
NodeListRequest
NodeListReply
NodeReply
EnginePlugin

Package cluster is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	CoreStackName = "amp"
)

Variables

This section is empty.

Functions

func RegisterClusterHandler added in v0.10.0

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 added in v0.16.0

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

RegisterClusterHandler 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 added in v0.10.0

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 {
	ClusterCreate(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateReply, error)
	ClusterList(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error)
	ClusterNodeList(ctx context.Context, in *NodeListRequest, opts ...grpc.CallOption) (*NodeListReply, error)
	ClusterStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusReply, error)
	ClusterUpdate(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateReply, error)
	ClusterRemove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*RemoveReply, error)
}

func NewClusterClient

func NewClusterClient(cc *grpc.ClientConn) ClusterClient

type ClusterServer

type ClusterServer interface {
	ClusterCreate(context.Context, *CreateRequest) (*CreateReply, error)
	ClusterList(context.Context, *ListRequest) (*ListReply, error)
	ClusterNodeList(context.Context, *NodeListRequest) (*NodeListReply, error)
	ClusterStatus(context.Context, *StatusRequest) (*StatusReply, error)
	ClusterUpdate(context.Context, *UpdateRequest) (*UpdateReply, error)
	ClusterRemove(context.Context, *RemoveRequest) (*RemoveReply, error)
}

type CreateReply

type CreateReply struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*CreateReply) Descriptor

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

func (*CreateReply) GetId

func (m *CreateReply) GetId() string

func (*CreateReply) ProtoMessage

func (*CreateReply) ProtoMessage()

func (*CreateReply) Reset

func (m *CreateReply) Reset()

func (*CreateReply) String

func (m *CreateReply) String() string

type CreateRequest

type CreateRequest struct {
	Name    string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Compose []byte `protobuf:"bytes,2,opt,name=compose,proto3" json:"compose,omitempty"`
}

func (*CreateRequest) Descriptor

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

func (*CreateRequest) GetCompose

func (m *CreateRequest) GetCompose() []byte

func (*CreateRequest) GetName

func (m *CreateRequest) GetName() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) Reset

func (m *CreateRequest) Reset()

func (*CreateRequest) String

func (m *CreateRequest) String() string

type EnginePlugin added in v0.17.0

type EnginePlugin struct {
	Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
}

func (*EnginePlugin) Descriptor added in v0.17.0

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

func (*EnginePlugin) GetName added in v0.17.0

func (m *EnginePlugin) GetName() string

func (*EnginePlugin) GetType added in v0.17.0

func (m *EnginePlugin) GetType() string

func (*EnginePlugin) ProtoMessage added in v0.17.0

func (*EnginePlugin) ProtoMessage()

func (*EnginePlugin) Reset added in v0.17.0

func (m *EnginePlugin) Reset()

func (*EnginePlugin) String added in v0.17.0

func (m *EnginePlugin) String() string

type InfoReply added in v0.17.0

type InfoReply struct {
}

func (*InfoReply) Descriptor added in v0.17.0

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

func (*InfoReply) ProtoMessage added in v0.17.0

func (*InfoReply) ProtoMessage()

func (*InfoReply) Reset added in v0.17.0

func (m *InfoReply) Reset()

func (*InfoReply) String added in v0.17.0

func (m *InfoReply) String() string

type InfoRequest added in v0.17.0

type InfoRequest struct {
}

func (*InfoRequest) Descriptor added in v0.17.0

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

func (*InfoRequest) ProtoMessage added in v0.17.0

func (*InfoRequest) ProtoMessage()

func (*InfoRequest) Reset added in v0.17.0

func (m *InfoRequest) Reset()

func (*InfoRequest) String added in v0.17.0

func (m *InfoRequest) String() string

type ListReply

type ListReply struct {
}

func (*ListReply) Descriptor

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

func (*ListReply) ProtoMessage

func (*ListReply) ProtoMessage()

func (*ListReply) Reset

func (m *ListReply) Reset()

func (*ListReply) String

func (m *ListReply) String() string

type ListRequest

type ListRequest struct {
}

func (*ListRequest) Descriptor

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

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) String

func (m *ListRequest) String() string

type NodeListReply added in v0.9.1

type NodeListReply struct {
	Nodes []*NodeReply `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
}

func (*NodeListReply) Descriptor added in v0.9.1

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

func (*NodeListReply) GetNodes added in v0.9.1

func (m *NodeListReply) GetNodes() []*NodeReply

func (*NodeListReply) ProtoMessage added in v0.9.1

func (*NodeListReply) ProtoMessage()

func (*NodeListReply) Reset added in v0.9.1

func (m *NodeListReply) Reset()

func (*NodeListReply) String added in v0.9.1

func (m *NodeListReply) String() string

type NodeListRequest added in v0.9.1

type NodeListRequest struct {
	Id          string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Role        string `protobuf:"bytes,3,opt,name=role" json:"role,omitempty"`
	NodeLabel   string `protobuf:"bytes,4,opt,name=node_label,json=nodeLabel" json:"node_label,omitempty"`
	EngineLabel string `protobuf:"bytes,5,opt,name=engine_label,json=engineLabel" json:"engine_label,omitempty"`
}

func (*NodeListRequest) Descriptor added in v0.9.1

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

func (*NodeListRequest) GetEngineLabel added in v0.17.0

func (m *NodeListRequest) GetEngineLabel() string

func (*NodeListRequest) GetId added in v0.17.0

func (m *NodeListRequest) GetId() string

func (*NodeListRequest) GetName added in v0.17.0

func (m *NodeListRequest) GetName() string

func (*NodeListRequest) GetNodeLabel added in v0.17.0

func (m *NodeListRequest) GetNodeLabel() string

func (*NodeListRequest) GetRole added in v0.17.0

func (m *NodeListRequest) GetRole() string

func (*NodeListRequest) ProtoMessage added in v0.9.1

func (*NodeListRequest) ProtoMessage()

func (*NodeListRequest) Reset added in v0.9.1

func (m *NodeListRequest) Reset()

func (*NodeListRequest) String added in v0.9.1

func (m *NodeListRequest) String() string

type NodeReply added in v0.9.1

type NodeReply struct {
	Id            string            `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Hostname      string            `protobuf:"bytes,2,opt,name=hostname" json:"hostname,omitempty"`
	Status        string            `protobuf:"bytes,3,opt,name=status" json:"status,omitempty"`
	Availability  string            `protobuf:"bytes,4,opt,name=availability" json:"availability,omitempty"`
	Role          string            `protobuf:"bytes,5,opt,name=role" json:"role,omitempty"`
	ManagerLeader bool              `protobuf:"varint,6,opt,name=manager_leader,json=managerLeader" json:"manager_leader,omitempty"`
	NanoCpus      int64             `protobuf:"varint,7,opt,name=nano_cpus,json=nanoCpus" json:"nano_cpus,omitempty"`
	MemoryBytes   int64             `protobuf:"varint,8,opt,name=memory_bytes,json=memoryBytes" json:"memory_bytes,omitempty"`
	NodeLabels    map[string]string `` /* 158-byte string literal not displayed */
	EngineLabels  map[string]string `` /* 165-byte string literal not displayed */
	EnginePlugins []*EnginePlugin   `protobuf:"bytes,11,rep,name=engine_plugins,json=enginePlugins" json:"engine_plugins,omitempty"`
	EngineVersion string            `protobuf:"bytes,12,opt,name=engine_version,json=engineVersion" json:"engine_version,omitempty"`
}

func (*NodeReply) Descriptor added in v0.9.1

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

func (*NodeReply) GetAvailability added in v0.9.1

func (m *NodeReply) GetAvailability() string

func (*NodeReply) GetEngineLabels added in v0.17.0

func (m *NodeReply) GetEngineLabels() map[string]string

func (*NodeReply) GetEnginePlugins added in v0.17.0

func (m *NodeReply) GetEnginePlugins() []*EnginePlugin

func (*NodeReply) GetEngineVersion added in v0.17.0

func (m *NodeReply) GetEngineVersion() string

func (*NodeReply) GetHostname added in v0.9.1

func (m *NodeReply) GetHostname() string

func (*NodeReply) GetId added in v0.9.1

func (m *NodeReply) GetId() string

func (*NodeReply) GetManagerLeader added in v0.9.1

func (m *NodeReply) GetManagerLeader() bool

func (*NodeReply) GetMemoryBytes added in v0.17.0

func (m *NodeReply) GetMemoryBytes() int64

func (*NodeReply) GetNanoCpus added in v0.17.0

func (m *NodeReply) GetNanoCpus() int64

func (*NodeReply) GetNodeLabels added in v0.17.0

func (m *NodeReply) GetNodeLabels() map[string]string

func (*NodeReply) GetRole added in v0.9.1

func (m *NodeReply) GetRole() string

func (*NodeReply) GetStatus added in v0.9.1

func (m *NodeReply) GetStatus() string

func (*NodeReply) ProtoMessage added in v0.9.1

func (*NodeReply) ProtoMessage()

func (*NodeReply) Reset added in v0.9.1

func (m *NodeReply) Reset()

func (*NodeReply) String added in v0.9.1

func (m *NodeReply) String() string

type RemoveReply

type RemoveReply struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*RemoveReply) Descriptor

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

func (*RemoveReply) GetId

func (m *RemoveReply) GetId() string

func (*RemoveReply) ProtoMessage

func (*RemoveReply) ProtoMessage()

func (*RemoveReply) Reset

func (m *RemoveReply) Reset()

func (*RemoveReply) String

func (m *RemoveReply) String() string

type RemoveRequest

type RemoveRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*RemoveRequest) Descriptor

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

func (*RemoveRequest) GetId

func (m *RemoveRequest) GetId() string

func (*RemoveRequest) ProtoMessage

func (*RemoveRequest) ProtoMessage()

func (*RemoveRequest) Reset

func (m *RemoveRequest) Reset()

func (*RemoveRequest) String

func (m *RemoveRequest) String() string

type Server

type Server struct {
	Docker   *docker.Docker
	Provider cloud.Provider
	Region   string
}

Server is used to implement cluster.ClusterServer

func (*Server) ClusterCreate added in v0.17.0

func (s *Server) ClusterCreate(ctx context.Context, in *CreateRequest) (*CreateReply, error)

Create implements cluster.Server

func (*Server) ClusterList added in v0.17.0

func (s *Server) ClusterList(ctx context.Context, in *ListRequest) (*ListReply, error)

List implements cluster.Server

func (*Server) ClusterNodeList added in v0.17.0

func (s *Server) ClusterNodeList(ctx context.Context, in *NodeListRequest) (*NodeListReply, error)

NodeList get cluster node list

func (*Server) ClusterRemove added in v0.17.0

func (s *Server) ClusterRemove(ctx context.Context, in *RemoveRequest) (*RemoveReply, error)

Remove implements cluster.Server

func (*Server) ClusterStatus added in v0.17.0

func (s *Server) ClusterStatus(ctx context.Context, in *StatusRequest) (*StatusReply, error)

Status implements cluster.Server

func (*Server) ClusterUpdate added in v0.17.0

func (s *Server) ClusterUpdate(ctx context.Context, in *UpdateRequest) (*UpdateReply, error)

Update implements cluster.Server

type StatusReply

type StatusReply struct {
	Name         string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Provider     string `protobuf:"bytes,2,opt,name=provider" json:"provider,omitempty"`
	Region       string `protobuf:"bytes,3,opt,name=region" json:"region,omitempty"`
	SwarmStatus  string `protobuf:"bytes,4,opt,name=swarm_status,json=swarmStatus" json:"swarm_status,omitempty"`
	CoreServices string `protobuf:"bytes,5,opt,name=core_services,json=coreServices" json:"core_services,omitempty"`
	UserServices string `protobuf:"bytes,6,opt,name=user_services,json=userServices" json:"user_services,omitempty"`
	Endpoint     string `protobuf:"bytes,7,opt,name=endpoint" json:"endpoint,omitempty"`
	NfsEndpoint  string `protobuf:"bytes,8,opt,name=nfs_endpoint,json=nfsEndpoint" json:"nfs_endpoint,omitempty"`
}

func (*StatusReply) Descriptor

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

func (*StatusReply) GetCoreServices added in v0.17.0

func (m *StatusReply) GetCoreServices() string

func (*StatusReply) GetEndpoint added in v0.17.0

func (m *StatusReply) GetEndpoint() string

func (*StatusReply) GetName added in v0.17.0

func (m *StatusReply) GetName() string

func (*StatusReply) GetNfsEndpoint added in v0.17.0

func (m *StatusReply) GetNfsEndpoint() string

func (*StatusReply) GetProvider added in v0.17.0

func (m *StatusReply) GetProvider() string

func (*StatusReply) GetRegion added in v0.17.0

func (m *StatusReply) GetRegion() string

func (*StatusReply) GetSwarmStatus added in v0.17.0

func (m *StatusReply) GetSwarmStatus() string

func (*StatusReply) GetUserServices added in v0.17.0

func (m *StatusReply) GetUserServices() string

func (*StatusReply) ProtoMessage

func (*StatusReply) ProtoMessage()

func (*StatusReply) Reset

func (m *StatusReply) Reset()

func (*StatusReply) String

func (m *StatusReply) String() string

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 UpdateReply

type UpdateReply struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*UpdateReply) Descriptor

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

func (*UpdateReply) GetId

func (m *UpdateReply) GetId() string

func (*UpdateReply) ProtoMessage

func (*UpdateReply) ProtoMessage()

func (*UpdateReply) Reset

func (m *UpdateReply) Reset()

func (*UpdateReply) String

func (m *UpdateReply) String() string

type UpdateRequest

type UpdateRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*UpdateRequest) Descriptor

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

func (*UpdateRequest) GetId

func (m *UpdateRequest) GetId() string

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) Reset

func (m *UpdateRequest) Reset()

func (*UpdateRequest) String

func (m *UpdateRequest) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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