scribe

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int

Functions

This section is empty.

Types

type LogEntry

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

Attributes:

  • Category
  • 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 ResultCode

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

func ResultCodeFromString

func ResultCodeFromString(s string) (ResultCode, error)

func ResultCodePtr

func ResultCodePtr(v ResultCode) *ResultCode

func (ResultCode) MarshalText

func (p ResultCode) MarshalText() ([]byte, error)

func (*ResultCode) Scan

func (p *ResultCode) Scan(value interface{}) error

func (ResultCode) String

func (p ResultCode) String() string

func (*ResultCode) UnmarshalText

func (p *ResultCode) UnmarshalText(text []byte) error

func (*ResultCode) Value

func (p *ResultCode) Value() (driver.Value, error)

type Scribe

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

type ScribeClient

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

func NewScribeClient added in v0.3.2

func NewScribeClient(c thrift.TClient) *ScribeClient

func NewScribeClientProtocol

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

func (*ScribeClient) Client_ added in v0.3.4

func (p *ScribeClient) Client_() thrift.TClient

func (*ScribeClient) Log

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

Parameters:

  • Messages

type ScribeLogArgs

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

Attributes:

  • Messages

func NewScribeLogArgs

func NewScribeLogArgs() *ScribeLogArgs

func (*ScribeLogArgs) GetMessages

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

func (*ScribeLogArgs) Read

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

func (*ScribeLogArgs) ReadField1

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

func (*ScribeLogArgs) String

func (p *ScribeLogArgs) String() string

func (*ScribeLogArgs) Write

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

type ScribeLogResult

type ScribeLogResult struct {
	Success *ResultCode `thrift:"success,0" db:"success" json:"success,omitempty"`
}

Attributes:

  • Success

func NewScribeLogResult

func NewScribeLogResult() *ScribeLogResult

func (*ScribeLogResult) GetSuccess

func (p *ScribeLogResult) GetSuccess() ResultCode

func (*ScribeLogResult) IsSetSuccess

func (p *ScribeLogResult) IsSetSuccess() bool

func (*ScribeLogResult) Read

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

func (*ScribeLogResult) ReadField0

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

func (*ScribeLogResult) String

func (p *ScribeLogResult) String() string

func (*ScribeLogResult) Write

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

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(ctx context.Context, 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