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 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) 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() int64
- 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) 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_GetStreamClient
- type Logs_GetStreamServer
- type Server
Constants ¶
View Source
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 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"`
}
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 int64 `protobuf:"zigzag64,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"` }
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) GetContainer ¶ added in v0.4.0
func (m *GetRequest) GetContainer() 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() int64
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"` }
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 { Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error) GetStream(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (Logs_GetStreamClient, error) }
func NewLogsClient ¶
func NewLogsClient(cc *grpc.ClientConn) LogsClient
type LogsServer ¶
type LogsServer interface { Get(context.Context, *GetRequest) (*GetReply, error) GetStream(*GetRequest, Logs_GetStreamServer) error }
type Logs_GetStreamClient ¶
type Logs_GetStreamClient interface { Recv() (*LogEntry, error) grpc.ClientStream }
type Logs_GetStreamServer ¶
type Logs_GetStreamServer 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) GetStream ¶ added in v0.4.0
func (s *Server) GetStream(in *GetRequest, stream Logs_GetStreamServer) error
GetStream implements log.LogServer
Click to show internal directories.
Click to hide internal directories.