scribe

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: BSD-3-Clause Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResultCodeOk       = ResultCode(0)
	ResultCodeTryLater = ResultCode(1)
	ResultCodeByName   = map[string]ResultCode{
		"ResultCode.OK":        ResultCodeOk,
		"ResultCode.TRY_LATER": ResultCodeTryLater,
	}
	ResultCodeByValue = map[ResultCode]string{
		ResultCodeOk:       "ResultCode.OK",
		ResultCodeTryLater: "ResultCode.TRY_LATER",
	}
)

Functions

This section is empty.

Types

type LogEntry

type LogEntry struct {
	Category string `thrift:"1,required" json:"category"`
	Message  string `thrift:"2,required" json:"message"`
}

type RPCClient

type RPCClient interface {
	Call(method string, request interface{}, response interface{}) error
}

type ResultCode

type ResultCode int32

func (ResultCode) String

func (e ResultCode) String() string

func (*ResultCode) UnmarshalJSON

func (e *ResultCode) UnmarshalJSON(b []byte) error

type Scribe

type Scribe interface {
	Log(Messages []*LogEntry) (ResultCode, error)
}

type ScribeClient

type ScribeClient struct {
	Client RPCClient
}

func (*ScribeClient) Log

func (s *ScribeClient) Log(Messages []*LogEntry) (ResultCode, error)

type ScribeLogRequest

type ScribeLogRequest struct {
	Messages []*LogEntry `thrift:"1,required" json:"messages"`
}

type ScribeLogResponse

type ScribeLogResponse struct {
	Value ResultCode `thrift:"0,required" json:"value"`
}

type ScribeServer

type ScribeServer struct {
	Implementation Scribe
}

func (*ScribeServer) Log

Jump to

Keyboard shortcuts

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