logs

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: 24 Imported by: 0

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

View Source
const (
	NumberOfEntries = 100
)

Variables

This section is empty.

Functions

func RegisterLogsHandler added in v0.4.0

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

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

func RegisterLogsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LogsClient) error

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

func (*GetReply) GetEntries

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

func (*GetReply) GetSize added in v0.17.0

func (m *GetReply) GetSize() int32

func (*GetReply) GetTotal added in v0.17.0

func (m *GetReply) GetTotal() int32

func (*GetReply) ProtoMessage

func (*GetReply) ProtoMessage()

func (*GetReply) Reset

func (m *GetReply) Reset()

func (*GetReply) String

func (m *GetReply) String() string

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

func (*LogEntry) GetContainerId added in v0.4.0

func (m *LogEntry) GetContainerId() string

func (*LogEntry) GetContainerName added in v0.9.0

func (m *LogEntry) GetContainerName() string

func (*LogEntry) GetContainerShortName added in v0.9.0

func (m *LogEntry) GetContainerShortName() string

func (*LogEntry) GetContainerState added in v0.9.0

func (m *LogEntry) GetContainerState() string

func (*LogEntry) GetFromId added in v0.17.0

func (m *LogEntry) GetFromId() string

func (*LogEntry) GetLabels added in v0.9.0

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

func (*LogEntry) GetMsg added in v0.9.0

func (m *LogEntry) GetMsg() string

func (*LogEntry) GetNodeId added in v0.4.0

func (m *LogEntry) GetNodeId() string

func (*LogEntry) GetServiceId added in v0.4.0

func (m *LogEntry) GetServiceId() string

func (*LogEntry) GetServiceName added in v0.4.0

func (m *LogEntry) GetServiceName() string

func (*LogEntry) GetStackId added in v0.4.0

func (m *LogEntry) GetStackId() string

func (*LogEntry) GetStackName added in v0.4.0

func (m *LogEntry) GetStackName() string

func (*LogEntry) GetTaskId added in v0.4.0

func (m *LogEntry) GetTaskId() string

func (*LogEntry) GetTaskSlot added in v0.12.0

func (m *LogEntry) GetTaskSlot() int32

func (*LogEntry) GetTimeId added in v0.4.0

func (m *LogEntry) GetTimeId() string

func (*LogEntry) GetTimestamp added in v0.4.0

func (m *LogEntry) GetTimestamp() string

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) Reset

func (m *LogEntry) Reset()

func (*LogEntry) String

func (m *LogEntry) String() string

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) LogsGet added in v0.17.0

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

Get implements logs.LogsServer

func (*Server) LogsGetStream added in v0.17.0

func (s *Server) LogsGetStream(in *GetRequest, stream Logs_LogsGetStreamServer) error

GetStream implements log.LogServer

Jump to

Keyboard shortcuts

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