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 StatusRequest StatusReply UpdateRequest UpdateReply RemoveRequest RemoveReply NodeListRequest NodeListReply NodeReply GetRegistrationStatusRequest GetRegistrationStatusReply
Package cluster is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterClusterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClusterClient) error
- func RegisterClusterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterClusterServer(s *grpc.Server, srv ClusterServer)
- type ClusterClient
- type ClusterServer
- type CreateReply
- type CreateRequest
- type GetRegistrationStatusReply
- type GetRegistrationStatusRequest
- type ListReply
- type ListRequest
- type NodeListReply
- type NodeListRequest
- type NodeReply
- func (*NodeReply) Descriptor() ([]byte, []int)
- func (m *NodeReply) GetAvailability() string
- func (m *NodeReply) GetHostname() string
- func (m *NodeReply) GetId() string
- func (m *NodeReply) GetManagerLeader() bool
- func (m *NodeReply) GetRole() string
- func (m *NodeReply) GetStatus() string
- func (*NodeReply) ProtoMessage()
- func (m *NodeReply) Reset()
- func (m *NodeReply) String() string
- type RemoveReply
- type RemoveRequest
- type Server
- func (s *Server) Create(ctx context.Context, in *CreateRequest) (*CreateReply, error)
- func (s *Server) GetRegistrationStatus(ctx context.Context, in *GetRegistrationStatusRequest) (*GetRegistrationStatusReply, error)
- func (s *Server) List(ctx context.Context, in *ListRequest) (*ListReply, error)
- func (s *Server) NodeList(ctx context.Context, in *NodeListRequest) (*NodeListReply, error)
- func (s *Server) Remove(ctx context.Context, in *RemoveRequest) (*RemoveReply, error)
- func (s *Server) Status(ctx context.Context, in *StatusRequest) (*StatusReply, error)
- func (s *Server) Update(ctx context.Context, in *UpdateRequest) (*UpdateReply, error)
- type StatusReply
- type StatusRequest
- type UpdateReply
- type UpdateRequest
Constants ¶
This section is empty.
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 { Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateReply, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error) NodeList(ctx context.Context, in *NodeListRequest, opts ...grpc.CallOption) (*NodeListReply, error) GetRegistrationStatus(ctx context.Context, in *GetRegistrationStatusRequest, opts ...grpc.CallOption) (*GetRegistrationStatusReply, error) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusReply, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateReply, error) Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*RemoveReply, error) }
func NewClusterClient ¶
func NewClusterClient(cc *grpc.ClientConn) ClusterClient
type ClusterServer ¶
type ClusterServer interface { Create(context.Context, *CreateRequest) (*CreateReply, error) List(context.Context, *ListRequest) (*ListReply, error) NodeList(context.Context, *NodeListRequest) (*NodeListReply, error) GetRegistrationStatus(context.Context, *GetRegistrationStatusRequest) (*GetRegistrationStatusReply, error) Status(context.Context, *StatusRequest) (*StatusReply, error) Update(context.Context, *UpdateRequest) (*UpdateReply, error) Remove(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 GetRegistrationStatusReply ¶ added in v0.11.0
type GetRegistrationStatusReply struct {
EmailConfirmation bool `protobuf:"varint,1,opt,name=email_confirmation,json=emailConfirmation" json:"email_confirmation,omitempty"`
}
func (*GetRegistrationStatusReply) Descriptor ¶ added in v0.11.0
func (*GetRegistrationStatusReply) Descriptor() ([]byte, []int)
func (*GetRegistrationStatusReply) GetEmailConfirmation ¶ added in v0.11.0
func (m *GetRegistrationStatusReply) GetEmailConfirmation() bool
func (*GetRegistrationStatusReply) ProtoMessage ¶ added in v0.11.0
func (*GetRegistrationStatusReply) ProtoMessage()
func (*GetRegistrationStatusReply) Reset ¶ added in v0.11.0
func (m *GetRegistrationStatusReply) Reset()
func (*GetRegistrationStatusReply) String ¶ added in v0.11.0
func (m *GetRegistrationStatusReply) String() string
type GetRegistrationStatusRequest ¶ added in v0.11.0
type GetRegistrationStatusRequest struct { }
func (*GetRegistrationStatusRequest) Descriptor ¶ added in v0.11.0
func (*GetRegistrationStatusRequest) Descriptor() ([]byte, []int)
func (*GetRegistrationStatusRequest) ProtoMessage ¶ added in v0.11.0
func (*GetRegistrationStatusRequest) ProtoMessage()
func (*GetRegistrationStatusRequest) Reset ¶ added in v0.11.0
func (m *GetRegistrationStatusRequest) Reset()
func (*GetRegistrationStatusRequest) String ¶ added in v0.11.0
func (m *GetRegistrationStatusRequest) String() string
type ListReply ¶
type ListReply struct { }
func (*ListReply) Descriptor ¶
func (*ListReply) ProtoMessage ¶
func (*ListReply) ProtoMessage()
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 { }
func (*NodeListRequest) Descriptor ¶ added in v0.9.1
func (*NodeListRequest) Descriptor() ([]byte, []int)
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"` }
func (*NodeReply) Descriptor ¶ added in v0.9.1
func (*NodeReply) GetAvailability ¶ added in v0.9.1
func (*NodeReply) GetHostname ¶ added in v0.9.1
func (*NodeReply) GetManagerLeader ¶ added in v0.9.1
func (*NodeReply) ProtoMessage ¶ added in v0.9.1
func (*NodeReply) ProtoMessage()
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 ¶
Server is used to implement cluster.ClusterServer
func (*Server) Create ¶
func (s *Server) Create(ctx context.Context, in *CreateRequest) (*CreateReply, error)
Create implements cluster.Server
func (*Server) GetRegistrationStatus ¶ added in v0.11.0
func (s *Server) GetRegistrationStatus(ctx context.Context, in *GetRegistrationStatusRequest) (*GetRegistrationStatusReply, error)
GetRegistrationStatus get the registration status
func (*Server) NodeList ¶ added in v0.9.1
func (s *Server) NodeList(ctx context.Context, in *NodeListRequest) (*NodeListReply, error)
NodeList get cluster node list
func (*Server) Remove ¶
func (s *Server) Remove(ctx context.Context, in *RemoveRequest) (*RemoveReply, error)
Remove implements cluster.Server
func (*Server) Status ¶
func (s *Server) Status(ctx context.Context, in *StatusRequest) (*StatusReply, error)
Status implements cluster.Server
func (*Server) Update ¶
func (s *Server) Update(ctx context.Context, in *UpdateRequest) (*UpdateReply, error)
Update implements cluster.Server
type StatusReply ¶
type StatusReply struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (*StatusReply) Descriptor ¶
func (*StatusReply) Descriptor() ([]byte, []int)
func (*StatusReply) GetId ¶
func (m *StatusReply) GetId() 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 {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (*StatusRequest) Descriptor ¶
func (*StatusRequest) Descriptor() ([]byte, []int)
func (*StatusRequest) GetId ¶
func (m *StatusRequest) GetId() string
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