scribe

package
v0.0.0-...-b50c569 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int

Functions

This section is empty.

Types

type LogArgs

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

func NewLogArgs

func NewLogArgs() *LogArgs

func (*LogArgs) GetMessages

func (p *LogArgs) GetMessages() []*LogEntry

func (*LogArgs) Read

func (p *LogArgs) Read(iprot thrift.TProtocol) error

func (*LogArgs) ReadField1

func (p *LogArgs) ReadField1(iprot thrift.TProtocol) error

func (*LogArgs) String

func (p *LogArgs) String() string

func (*LogArgs) Write

func (p *LogArgs) Write(oprot thrift.TProtocol) error

type LogEntry

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

func NewLogEntry

func NewLogEntry() *LogEntry

func (*LogEntry) GetCategory

func (p *LogEntry) GetCategory() string

func (*LogEntry) GetMessage

func (p *LogEntry) GetMessage() string

func (*LogEntry) Read

func (p *LogEntry) Read(iprot thrift.TProtocol) error

func (*LogEntry) ReadField1

func (p *LogEntry) ReadField1(iprot thrift.TProtocol) error

func (*LogEntry) ReadField2

func (p *LogEntry) ReadField2(iprot thrift.TProtocol) error

func (*LogEntry) String

func (p *LogEntry) String() string

func (*LogEntry) Write

func (p *LogEntry) Write(oprot thrift.TProtocol) error

type LogResult

type LogResult struct {
	Success *ResultCode `thrift:"success,0" json:"success"`
}

func NewLogResult

func NewLogResult() *LogResult

func (*LogResult) GetSuccess

func (p *LogResult) GetSuccess() ResultCode

func (*LogResult) IsSetSuccess

func (p *LogResult) IsSetSuccess() bool

func (*LogResult) Read

func (p *LogResult) Read(iprot thrift.TProtocol) error

func (*LogResult) ReadField0

func (p *LogResult) ReadField0(iprot thrift.TProtocol) error

func (*LogResult) String

func (p *LogResult) String() string

func (*LogResult) Write

func (p *LogResult) Write(oprot thrift.TProtocol) error

type ResultCode

type ResultCode int64
const (
	ResultCode_OK        ResultCode = 0
	ResultCode_TRY_LATER ResultCode = 1
)
var LogResult_Success_DEFAULT ResultCode

func ResultCodeFromString

func ResultCodeFromString(s string) (ResultCode, error)

func ResultCodePtr

func ResultCodePtr(v ResultCode) *ResultCode

func (ResultCode) String

func (p ResultCode) String() string

type Scribe

type Scribe interface {
	// Parameters:
	//  - Messages
	Log(messages []*LogEntry) (r ResultCode, err error)
}

type ScribeClient

type ScribeClient struct {
	Transport       thrift.TTransport
	ProtocolFactory thrift.TProtocolFactory
	InputProtocol   thrift.TProtocol
	OutputProtocol  thrift.TProtocol
	SeqId           int32
}

func NewScribeClientProtocol

func NewScribeClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *ScribeClient

func (*ScribeClient) Log

func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error)

Parameters:

  • Messages

type ScribeProcessor

type ScribeProcessor struct {
	// contains filtered or unexported fields
}

func NewScribeProcessor

func NewScribeProcessor(handler Scribe) *ScribeProcessor

func (*ScribeProcessor) AddToProcessorMap

func (p *ScribeProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*ScribeProcessor) GetProcessorFunction

func (p *ScribeProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*ScribeProcessor) Process

func (p *ScribeProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*ScribeProcessor) ProcessorMap

func (p *ScribeProcessor) ProcessorMap() map[string]thrift.TProcessorFunction

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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