Documentation ¶
Overview ¶
Package logs is a generated protocol buffer package.
It is generated from these files:
github.com/appcelerator/amp/api/rpc/logs/logs.proto
It has these top-level messages:
LogEntry GetRequest GetReply
Package logs is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- func RegisterLogsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterLogsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LogsClient) error
- func RegisterLogsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterLogsServer(s *grpc.Server, srv LogsServer)
- type GetReply
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)
- func (m *GetRequest) GetContainer() string
- func (m *GetRequest) GetFrom() string
- func (m *GetRequest) GetIncludeAmpLogs() bool
- func (m *GetRequest) GetMessage() string
- func (m *GetRequest) GetNode() string
- func (m *GetRequest) GetRegexp() bool
- func (m *GetRequest) GetService() string
- func (m *GetRequest) GetSince() int32
- func (m *GetRequest) GetSize() int32
- func (m *GetRequest) GetStack() string
- func (m *GetRequest) GetTask() string
- func (*GetRequest) ProtoMessage()
- func (m *GetRequest) Reset()
- func (m *GetRequest) String() string
- type LogEntry
- func (*LogEntry) Descriptor() ([]byte, []int)
- func (m *LogEntry) GetContainerId() string
- func (m *LogEntry) GetContainerName() string
- func (m *LogEntry) GetContainerShortName() string
- func (m *LogEntry) GetContainerState() string
- func (m *LogEntry) GetFromId() string
- func (m *LogEntry) GetLabels() map[string]string
- func (m *LogEntry) GetMsg() string
- func (m *LogEntry) GetNodeId() string
- func (m *LogEntry) GetServiceId() string
- func (m *LogEntry) GetServiceName() string
- func (m *LogEntry) GetStackId() string
- func (m *LogEntry) GetStackName() string
- func (m *LogEntry) GetTaskId() string
- func (m *LogEntry) GetTaskSlot() int32
- func (m *LogEntry) GetTimeId() string
- func (m *LogEntry) GetTimestamp() string
- func (*LogEntry) ProtoMessage()
- func (m *LogEntry) Reset()
- func (m *LogEntry) String() string
- type LogsClient
- type LogsServer
- type Logs_LogsGetStreamClient
- type Logs_LogsGetStreamServer
- type Server
Constants ¶
const (
NumberOfEntries = 100
)
Variables ¶
This section is empty.
Functions ¶
func RegisterLogsHandler ¶ added in v0.4.0
RegisterLogsHandler registers the http handlers for service Logs to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterLogsHandlerClient ¶ added in v0.16.0
RegisterLogsHandler registers the http handlers for service Logs to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LogsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LogsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "LogsClient" to call the correct interceptors.
func RegisterLogsHandlerFromEndpoint ¶ added in v0.4.0
func RegisterLogsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterLogsHandlerFromEndpoint is same as RegisterLogsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterLogsServer ¶
func RegisterLogsServer(s *grpc.Server, srv LogsServer)
Types ¶
type GetReply ¶
type GetReply struct { Entries []*LogEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` Size int32 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` Total int32 `protobuf:"varint,3,opt,name=total" json:"total,omitempty"` }
func (*GetReply) Descriptor ¶
func (*GetReply) GetEntries ¶
func (*GetReply) ProtoMessage ¶
func (*GetReply) ProtoMessage()
type GetRequest ¶
type GetRequest struct { Container string `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` Node string `protobuf:"bytes,3,opt,name=node" json:"node,omitempty"` Regexp bool `protobuf:"varint,4,opt,name=regexp" json:"regexp,omitempty"` Size int32 `protobuf:"varint,5,opt,name=size" json:"size,omitempty"` Service string `protobuf:"bytes,6,opt,name=service" json:"service,omitempty"` Stack string `protobuf:"bytes,7,opt,name=stack" json:"stack,omitempty"` Task string `protobuf:"bytes,8,opt,name=task" json:"task,omitempty"` IncludeAmpLogs bool `protobuf:"varint,9,opt,name=includeAmpLogs" json:"includeAmpLogs,omitempty"` Since int32 `protobuf:"varint,10,opt,name=since" json:"since,omitempty"` From string `protobuf:"bytes,11,opt,name=from" json:"from,omitempty"` }
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) GetContainer ¶ added in v0.4.0
func (m *GetRequest) GetContainer() string
func (*GetRequest) GetFrom ¶ added in v0.17.0
func (m *GetRequest) GetFrom() string
func (*GetRequest) GetIncludeAmpLogs ¶ added in v0.12.0
func (m *GetRequest) GetIncludeAmpLogs() bool
func (*GetRequest) GetMessage ¶ added in v0.4.0
func (m *GetRequest) GetMessage() string
func (*GetRequest) GetNode ¶ added in v0.4.0
func (m *GetRequest) GetNode() string
func (*GetRequest) GetRegexp ¶ added in v0.14.0
func (m *GetRequest) GetRegexp() bool
func (*GetRequest) GetService ¶ added in v0.4.0
func (m *GetRequest) GetService() string
func (*GetRequest) GetSince ¶ added in v0.13.0
func (m *GetRequest) GetSince() int32
func (*GetRequest) GetSize ¶ added in v0.4.0
func (m *GetRequest) GetSize() int32
func (*GetRequest) GetStack ¶ added in v0.4.0
func (m *GetRequest) GetStack() string
func (*GetRequest) GetTask ¶ added in v0.10.0
func (m *GetRequest) GetTask() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) String ¶
func (m *GetRequest) String() string
type LogEntry ¶
type LogEntry struct { Timestamp string `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"` ContainerId string `protobuf:"bytes,2,opt,name=container_id,json=containerId" json:"container_id,omitempty"` ContainerName string `protobuf:"bytes,3,opt,name=container_name,json=containerName" json:"container_name,omitempty"` ContainerShortName string `protobuf:"bytes,4,opt,name=container_short_name,json=containerShortName" json:"container_short_name,omitempty"` ContainerState string `protobuf:"bytes,5,opt,name=container_state,json=containerState" json:"container_state,omitempty"` ServiceName string `protobuf:"bytes,6,opt,name=service_name,json=serviceName" json:"service_name,omitempty"` ServiceId string `protobuf:"bytes,7,opt,name=service_id,json=serviceId" json:"service_id,omitempty"` TaskId string `protobuf:"bytes,8,opt,name=task_id,json=taskId" json:"task_id,omitempty"` TaskSlot int32 `protobuf:"varint,9,opt,name=task_slot,json=taskSlot" json:"task_slot,omitempty"` StackName string `protobuf:"bytes,10,opt,name=stack_name,json=stackName" json:"stack_name,omitempty"` StackId string `protobuf:"bytes,11,opt,name=stack_id,json=stackId" json:"stack_id,omitempty"` NodeId string `protobuf:"bytes,12,opt,name=node_id,json=nodeId" json:"node_id,omitempty"` TimeId string `protobuf:"bytes,13,opt,name=time_id,json=timeId" json:"time_id,omitempty"` Labels map[string]string `` /* 133-byte string literal not displayed */ Msg string `protobuf:"bytes,15,opt,name=msg" json:"msg,omitempty"` FromId string `protobuf:"bytes,16,opt,name=from_id,json=fromId" json:"from_id,omitempty"` }
func (*LogEntry) Descriptor ¶
func (*LogEntry) GetContainerId ¶ added in v0.4.0
func (*LogEntry) GetContainerName ¶ added in v0.9.0
func (*LogEntry) GetContainerShortName ¶ added in v0.9.0
func (*LogEntry) GetContainerState ¶ added in v0.9.0
func (*LogEntry) GetServiceId ¶ added in v0.4.0
func (*LogEntry) GetServiceName ¶ added in v0.4.0
func (*LogEntry) GetStackId ¶ added in v0.4.0
func (*LogEntry) GetStackName ¶ added in v0.4.0
func (*LogEntry) GetTaskSlot ¶ added in v0.12.0
func (*LogEntry) GetTimestamp ¶ added in v0.4.0
func (*LogEntry) ProtoMessage ¶
func (*LogEntry) ProtoMessage()
type LogsClient ¶
type LogsClient interface { LogsGet(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error) LogsGetStream(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (Logs_LogsGetStreamClient, error) }
func NewLogsClient ¶
func NewLogsClient(cc *grpc.ClientConn) LogsClient
type LogsServer ¶
type LogsServer interface { LogsGet(context.Context, *GetRequest) (*GetReply, error) LogsGetStream(*GetRequest, Logs_LogsGetStreamServer) error }
type Logs_LogsGetStreamClient ¶ added in v0.17.0
type Logs_LogsGetStreamClient interface { Recv() (*LogEntry, error) grpc.ClientStream }
type Logs_LogsGetStreamServer ¶ added in v0.17.0
type Logs_LogsGetStreamServer interface { Send(*LogEntry) error grpc.ServerStream }
type Server ¶ added in v0.4.0
type Server struct { ES *elasticsearch.Elasticsearch NS *ns.NatsStreaming }
Server is used to implement log.LogServer
func (*Server) LogsGetStream ¶ added in v0.17.0
func (s *Server) LogsGetStream(in *GetRequest, stream Logs_LogsGetStreamServer) error
GetStream implements log.LogServer