Documentation ¶
Overview ¶
Package node is a generated protocol buffer package.
It is generated from these files:
github.com/appcelerator/amp/api/rpc/node/node.proto
It has these top-level messages:
NodeEntry GetRequest GetReply
Package node is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterNodeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodeClient) error
- func RegisterNodeHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterNodeServer(s *grpc.Server, srv NodeServer)
- type GetReply
- type GetRequest
- type NodeClient
- type NodeEntry
- func (*NodeEntry) Descriptor() ([]byte, []int)
- func (m *NodeEntry) GetAddr() string
- func (m *NodeEntry) GetArchitecture() string
- func (m *NodeEntry) GetAvailability() string
- func (m *NodeEntry) GetEngine() string
- func (m *NodeEntry) GetHostname() string
- func (m *NodeEntry) GetId() string
- func (m *NodeEntry) GetLabels() map[string]string
- func (m *NodeEntry) GetLeader() bool
- func (m *NodeEntry) GetName() string
- func (m *NodeEntry) GetOs() string
- func (m *NodeEntry) GetReachability() string
- func (m *NodeEntry) GetRole() string
- func (m *NodeEntry) GetStatus() string
- func (*NodeEntry) ProtoMessage()
- func (m *NodeEntry) Reset()
- func (m *NodeEntry) String() string
- type NodeServer
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterNodeHandler ¶
RegisterNodeHandler registers the http handlers for service Node to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterNodeHandlerClient ¶ added in v0.16.0
RegisterNodeHandler registers the http handlers for service Node to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NodeClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NodeClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NodeClient" to call the correct interceptors.
func RegisterNodeHandlerFromEndpoint ¶
func RegisterNodeHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterNodeHandlerFromEndpoint is same as RegisterNodeHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterNodeServer ¶
func RegisterNodeServer(s *grpc.Server, srv NodeServer)
Types ¶
type GetReply ¶ added in v0.17.0
type GetReply struct {
Entries []*NodeEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
}
func (*GetReply) Descriptor ¶ added in v0.17.0
func (*GetReply) GetEntries ¶ added in v0.17.0
func (*GetReply) ProtoMessage ¶ added in v0.17.0
func (*GetReply) ProtoMessage()
type GetRequest ¶ added in v0.17.0
type GetRequest struct { }
func (*GetRequest) Descriptor ¶ added in v0.17.0
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) ProtoMessage ¶ added in v0.17.0
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶ added in v0.17.0
func (m *GetRequest) Reset()
func (*GetRequest) String ¶ added in v0.17.0
func (m *GetRequest) String() string
type NodeClient ¶
type NodeClient interface {
NodeGet(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error)
}
func NewNodeClient ¶
func NewNodeClient(cc *grpc.ClientConn) NodeClient
type NodeEntry ¶
type NodeEntry struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Hostname string `protobuf:"bytes,3,opt,name=hostname" json:"hostname,omitempty"` Role string `protobuf:"bytes,4,opt,name=role" json:"role,omitempty"` Architecture string `protobuf:"bytes,5,opt,name=architecture" json:"architecture,omitempty"` Os string `protobuf:"bytes,6,opt,name=os" json:"os,omitempty"` Engine string `protobuf:"bytes,7,opt,name=engine" json:"engine,omitempty"` Status string `protobuf:"bytes,8,opt,name=status" json:"status,omitempty"` Availability string `protobuf:"bytes,9,opt,name=availability" json:"availability,omitempty"` Labels map[string]string `` /* 133-byte string literal not displayed */ Leader bool `protobuf:"varint,11,opt,name=leader" json:"leader,omitempty"` Addr string `protobuf:"bytes,12,opt,name=addr" json:"addr,omitempty"` Reachability string `protobuf:"bytes,13,opt,name=reachability" json:"reachability,omitempty"` }
func (*NodeEntry) Descriptor ¶
func (*NodeEntry) GetArchitecture ¶
func (*NodeEntry) GetAvailability ¶
func (*NodeEntry) GetHostname ¶
func (*NodeEntry) GetReachability ¶
func (*NodeEntry) ProtoMessage ¶
func (*NodeEntry) ProtoMessage()
type NodeServer ¶
type NodeServer interface {
NodeGet(context.Context, *GetRequest) (*GetReply, error)
}