logs

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2017 License: Apache-2.0 Imports: 23 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 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) Descriptor() ([]byte, []int)

func (*GetReply) GetEntries

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

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"`
	Size           int64  `protobuf:"zigzag64,4,opt,name=size" json:"size,omitempty"`
	Service        string `protobuf:"bytes,5,opt,name=service" json:"service,omitempty"`
	Stack          string `protobuf:"bytes,6,opt,name=stack" json:"stack,omitempty"`
	Task           string `protobuf:"bytes,7,opt,name=task" json:"task,omitempty"`
	IncludeAmpLogs bool   `protobuf:"varint,8,opt,name=includeAmpLogs" json:"includeAmpLogs,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) GetService added in v0.4.0

func (m *GetRequest) GetService() string

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"`
	NodeId             string            `protobuf:"bytes,11,opt,name=node_id,json=nodeId" json:"node_id,omitempty"`
	TimeId             string            `protobuf:"bytes,12,opt,name=time_id,json=timeId" json:"time_id,omitempty"`
	Labels             map[string]string `` /* 133-byte string literal not displayed */
	Msg                string            `protobuf:"bytes,14,opt,name=msg" json:"msg,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) 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) 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 {
	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) Get added in v0.4.0

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

Get implements logs.LogsServer

func (*Server) GetStream added in v0.4.0

func (s *Server) GetStream(in *GetRequest, stream Logs_GetStreamServer) error

GetStream implements log.LogServer

Jump to

Keyboard shortcuts

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