node

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2018 License: Apache-2.0 Imports: 15 Imported by: 4

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterNodeHandler

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

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

func RegisterNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodeClient) error

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) Descriptor() ([]byte, []int)

func (*GetReply) GetEntries added in v0.17.0

func (m *GetReply) GetEntries() []*NodeEntry

func (*GetReply) ProtoMessage added in v0.17.0

func (*GetReply) ProtoMessage()

func (*GetReply) Reset added in v0.17.0

func (m *GetReply) Reset()

func (*GetReply) String added in v0.17.0

func (m *GetReply) String() string

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) Descriptor() ([]byte, []int)

func (*NodeEntry) GetAddr

func (m *NodeEntry) GetAddr() string

func (*NodeEntry) GetArchitecture

func (m *NodeEntry) GetArchitecture() string

func (*NodeEntry) GetAvailability

func (m *NodeEntry) GetAvailability() string

func (*NodeEntry) GetEngine

func (m *NodeEntry) GetEngine() string

func (*NodeEntry) GetHostname

func (m *NodeEntry) GetHostname() string

func (*NodeEntry) GetId

func (m *NodeEntry) GetId() string

func (*NodeEntry) GetLabels

func (m *NodeEntry) GetLabels() map[string]string

func (*NodeEntry) GetLeader

func (m *NodeEntry) GetLeader() bool

func (*NodeEntry) GetName

func (m *NodeEntry) GetName() string

func (*NodeEntry) GetOs

func (m *NodeEntry) GetOs() string

func (*NodeEntry) GetReachability

func (m *NodeEntry) GetReachability() string

func (*NodeEntry) GetRole

func (m *NodeEntry) GetRole() string

func (*NodeEntry) GetStatus

func (m *NodeEntry) GetStatus() string

func (*NodeEntry) ProtoMessage

func (*NodeEntry) ProtoMessage()

func (*NodeEntry) Reset

func (m *NodeEntry) Reset()

func (*NodeEntry) String

func (m *NodeEntry) String() string

type NodeServer

type NodeServer interface {
	NodeGet(context.Context, *GetRequest) (*GetReply, error)
}

type Server

type Server struct {
	Docker *docker.Docker
}

Server is used to implement log.LogServer

func (*Server) NodeGet added in v0.17.0

func (s *Server) NodeGet(ctx context.Context, in *GetRequest) (*GetReply, error)

GetNodes implements Node.GetNodes

Jump to

Keyboard shortcuts

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