fb303

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

README

fb303 (Facebook Bassline) for Go

This package is built automatically from Thrift repository at rev b5948eb378db07906594813b3e170b64d4352487.

thrift \
	--gen go:package_prefix=github.com/artyom/ \
	contrib/fb303/if/fb303.thrift

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int

Functions

This section is empty.

Types

type AliveSinceArgs

type AliveSinceArgs struct {
}

func NewAliveSinceArgs

func NewAliveSinceArgs() *AliveSinceArgs

func (*AliveSinceArgs) Read

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

func (*AliveSinceArgs) String

func (p *AliveSinceArgs) String() string

func (*AliveSinceArgs) Write

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

type AliveSinceResult

type AliveSinceResult struct {
	Success int64 `thrift:"success,0"`
}

func NewAliveSinceResult

func NewAliveSinceResult() *AliveSinceResult

func (*AliveSinceResult) Read

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

func (*AliveSinceResult) String

func (p *AliveSinceResult) String() string

func (*AliveSinceResult) Write

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

type FacebookService

type FacebookService interface {

	// Returns a descriptive name of the service
	GetName() (r string, err error)
	// Returns the version of the service
	GetVersion() (r string, err error)
	// Gets the status of this service
	GetStatus() (r FbStatus, err error)
	// User friendly description of status, such as why the service is in
	// the dead or warning state, or what is being started or stopped.
	GetStatusDetails() (r string, err error)
	// Gets the counters for this service
	GetCounters() (r map[string]int64, err error)
	// Gets the value of a single counter
	//
	// Parameters:
	//  - Key
	GetCounter(key string) (r int64, err error)
	// Sets an option
	//
	// Parameters:
	//  - Key
	//  - Value
	SetOption(key string, value string) (err error)
	// Gets an option
	//
	// Parameters:
	//  - Key
	GetOption(key string) (r string, err error)
	// Gets all options
	GetOptions() (r map[string]string, err error)
	// Returns a CPU profile over the given time interval (client and server
	// must agree on the profile format).
	//
	// Parameters:
	//  - ProfileDurationInSec
	GetCpuProfile(profileDurationInSec int32) (r string, err error)
	// Returns the unix time that the server has been running since
	AliveSince() (r int64, err error)
	// Tell the server to reload its configuration, reopen log files, etc
	Reinitialize() (err error)
	// Suggest a shutdown to the server
	Shutdown() (err error)
}

type FacebookServiceClient

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

Standard base service

func NewFacebookServiceClientProtocol

func NewFacebookServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *FacebookServiceClient

func (*FacebookServiceClient) AliveSince

func (p *FacebookServiceClient) AliveSince() (r int64, err error)

Returns the unix time that the server has been running since

func (*FacebookServiceClient) GetCounter

func (p *FacebookServiceClient) GetCounter(key string) (r int64, err error)

Gets the value of a single counter

Parameters:

  • Key

func (*FacebookServiceClient) GetCounters

func (p *FacebookServiceClient) GetCounters() (r map[string]int64, err error)

Gets the counters for this service

func (*FacebookServiceClient) GetCpuProfile

func (p *FacebookServiceClient) GetCpuProfile(profileDurationInSec int32) (r string, err error)

Returns a CPU profile over the given time interval (client and server must agree on the profile format).

Parameters:

  • ProfileDurationInSec

func (*FacebookServiceClient) GetName

func (p *FacebookServiceClient) GetName() (r string, err error)

Returns a descriptive name of the service

func (*FacebookServiceClient) GetOption

func (p *FacebookServiceClient) GetOption(key string) (r string, err error)

Gets an option

Parameters:

  • Key

func (*FacebookServiceClient) GetOptions

func (p *FacebookServiceClient) GetOptions() (r map[string]string, err error)

Gets all options

func (*FacebookServiceClient) GetStatus

func (p *FacebookServiceClient) GetStatus() (r FbStatus, err error)

Gets the status of this service

func (*FacebookServiceClient) GetStatusDetails

func (p *FacebookServiceClient) GetStatusDetails() (r string, err error)

User friendly description of status, such as why the service is in the dead or warning state, or what is being started or stopped.

func (*FacebookServiceClient) GetVersion

func (p *FacebookServiceClient) GetVersion() (r string, err error)

Returns the version of the service

func (*FacebookServiceClient) Reinitialize

func (p *FacebookServiceClient) Reinitialize() (err error)

Tell the server to reload its configuration, reopen log files, etc

func (*FacebookServiceClient) SetOption

func (p *FacebookServiceClient) SetOption(key string, value string) (err error)

Sets an option

Parameters:

  • Key
  • Value

func (*FacebookServiceClient) Shutdown

func (p *FacebookServiceClient) Shutdown() (err error)

Suggest a shutdown to the server

type FacebookServiceProcessor

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

func NewFacebookServiceProcessor

func NewFacebookServiceProcessor(handler FacebookService) *FacebookServiceProcessor

func (*FacebookServiceProcessor) AddToProcessorMap

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

func (*FacebookServiceProcessor) GetProcessorFunction

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

func (*FacebookServiceProcessor) Process

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

func (*FacebookServiceProcessor) ProcessorMap

type FbStatus

type FbStatus int64

Common status reporting mechanism across all services

const (
	FbStatus_DEAD     FbStatus = 0
	FbStatus_STARTING FbStatus = 1
	FbStatus_ALIVE    FbStatus = 2
	FbStatus_STOPPING FbStatus = 3
	FbStatus_STOPPED  FbStatus = 4
	FbStatus_WARNING  FbStatus = 5
)

func FbStatusFromString

func FbStatusFromString(s string) (FbStatus, error)

func (FbStatus) String

func (p FbStatus) String() string

type GetCounterArgs

type GetCounterArgs struct {
	Key string `thrift:"key,1"`
}

func NewGetCounterArgs

func NewGetCounterArgs() *GetCounterArgs

func (*GetCounterArgs) Read

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

func (*GetCounterArgs) String

func (p *GetCounterArgs) String() string

func (*GetCounterArgs) Write

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

type GetCounterResult

type GetCounterResult struct {
	Success int64 `thrift:"success,0"`
}

func NewGetCounterResult

func NewGetCounterResult() *GetCounterResult

func (*GetCounterResult) Read

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

func (*GetCounterResult) String

func (p *GetCounterResult) String() string

func (*GetCounterResult) Write

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

type GetCountersArgs

type GetCountersArgs struct {
}

func NewGetCountersArgs

func NewGetCountersArgs() *GetCountersArgs

func (*GetCountersArgs) Read

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

func (*GetCountersArgs) String

func (p *GetCountersArgs) String() string

func (*GetCountersArgs) Write

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

type GetCountersResult

type GetCountersResult struct {
	Success map[string]int64 `thrift:"success,0"`
}

func NewGetCountersResult

func NewGetCountersResult() *GetCountersResult

func (*GetCountersResult) Read

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

func (*GetCountersResult) String

func (p *GetCountersResult) String() string

func (*GetCountersResult) Write

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

type GetCpuProfileArgs

type GetCpuProfileArgs struct {
	ProfileDurationInSec int32 `thrift:"profileDurationInSec,1"`
}

func NewGetCpuProfileArgs

func NewGetCpuProfileArgs() *GetCpuProfileArgs

func (*GetCpuProfileArgs) Read

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

func (*GetCpuProfileArgs) String

func (p *GetCpuProfileArgs) String() string

func (*GetCpuProfileArgs) Write

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

type GetCpuProfileResult

type GetCpuProfileResult struct {
	Success string `thrift:"success,0"`
}

func NewGetCpuProfileResult

func NewGetCpuProfileResult() *GetCpuProfileResult

func (*GetCpuProfileResult) Read

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

func (*GetCpuProfileResult) String

func (p *GetCpuProfileResult) String() string

func (*GetCpuProfileResult) Write

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

type GetNameArgs

type GetNameArgs struct {
}

func NewGetNameArgs

func NewGetNameArgs() *GetNameArgs

func (*GetNameArgs) Read

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

func (*GetNameArgs) String

func (p *GetNameArgs) String() string

func (*GetNameArgs) Write

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

type GetNameResult

type GetNameResult struct {
	Success string `thrift:"success,0"`
}

func NewGetNameResult

func NewGetNameResult() *GetNameResult

func (*GetNameResult) Read

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

func (*GetNameResult) String

func (p *GetNameResult) String() string

func (*GetNameResult) Write

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

type GetOptionArgs

type GetOptionArgs struct {
	Key string `thrift:"key,1"`
}

func NewGetOptionArgs

func NewGetOptionArgs() *GetOptionArgs

func (*GetOptionArgs) Read

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

func (*GetOptionArgs) String

func (p *GetOptionArgs) String() string

func (*GetOptionArgs) Write

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

type GetOptionResult

type GetOptionResult struct {
	Success string `thrift:"success,0"`
}

func NewGetOptionResult

func NewGetOptionResult() *GetOptionResult

func (*GetOptionResult) Read

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

func (*GetOptionResult) String

func (p *GetOptionResult) String() string

func (*GetOptionResult) Write

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

type GetOptionsArgs

type GetOptionsArgs struct {
}

func NewGetOptionsArgs

func NewGetOptionsArgs() *GetOptionsArgs

func (*GetOptionsArgs) Read

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

func (*GetOptionsArgs) String

func (p *GetOptionsArgs) String() string

func (*GetOptionsArgs) Write

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

type GetOptionsResult

type GetOptionsResult struct {
	Success map[string]string `thrift:"success,0"`
}

func NewGetOptionsResult

func NewGetOptionsResult() *GetOptionsResult

func (*GetOptionsResult) Read

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

func (*GetOptionsResult) String

func (p *GetOptionsResult) String() string

func (*GetOptionsResult) Write

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

type GetStatusArgs

type GetStatusArgs struct {
}

func NewGetStatusArgs

func NewGetStatusArgs() *GetStatusArgs

func (*GetStatusArgs) Read

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

func (*GetStatusArgs) String

func (p *GetStatusArgs) String() string

func (*GetStatusArgs) Write

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

type GetStatusDetailsArgs

type GetStatusDetailsArgs struct {
}

func NewGetStatusDetailsArgs

func NewGetStatusDetailsArgs() *GetStatusDetailsArgs

func (*GetStatusDetailsArgs) Read

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

func (*GetStatusDetailsArgs) String

func (p *GetStatusDetailsArgs) String() string

func (*GetStatusDetailsArgs) Write

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

type GetStatusDetailsResult

type GetStatusDetailsResult struct {
	Success string `thrift:"success,0"`
}

func NewGetStatusDetailsResult

func NewGetStatusDetailsResult() *GetStatusDetailsResult

func (*GetStatusDetailsResult) Read

func (*GetStatusDetailsResult) String

func (p *GetStatusDetailsResult) String() string

func (*GetStatusDetailsResult) Write

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

type GetStatusResult

type GetStatusResult struct {
	Success FbStatus `thrift:"success,0"`
}

func NewGetStatusResult

func NewGetStatusResult() *GetStatusResult

func (*GetStatusResult) IsSetSuccess

func (p *GetStatusResult) IsSetSuccess() bool

func (*GetStatusResult) Read

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

func (*GetStatusResult) String

func (p *GetStatusResult) String() string

func (*GetStatusResult) Write

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

type GetVersionArgs

type GetVersionArgs struct {
}

func NewGetVersionArgs

func NewGetVersionArgs() *GetVersionArgs

func (*GetVersionArgs) Read

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

func (*GetVersionArgs) String

func (p *GetVersionArgs) String() string

func (*GetVersionArgs) Write

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

type GetVersionResult

type GetVersionResult struct {
	Success string `thrift:"success,0"`
}

func NewGetVersionResult

func NewGetVersionResult() *GetVersionResult

func (*GetVersionResult) Read

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

func (*GetVersionResult) String

func (p *GetVersionResult) String() string

func (*GetVersionResult) Write

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

type ReinitializeArgs

type ReinitializeArgs struct {
}

func NewReinitializeArgs

func NewReinitializeArgs() *ReinitializeArgs

func (*ReinitializeArgs) Read

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

func (*ReinitializeArgs) String

func (p *ReinitializeArgs) String() string

func (*ReinitializeArgs) Write

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

type ReinitializeResult

type ReinitializeResult struct {
}

func NewReinitializeResult

func NewReinitializeResult() *ReinitializeResult

func (*ReinitializeResult) Read

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

func (*ReinitializeResult) String

func (p *ReinitializeResult) String() string

func (*ReinitializeResult) Write

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

type SetOptionArgs

type SetOptionArgs struct {
	Key   string `thrift:"key,1"`
	Value string `thrift:"value,2"`
}

func NewSetOptionArgs

func NewSetOptionArgs() *SetOptionArgs

func (*SetOptionArgs) Read

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

func (*SetOptionArgs) String

func (p *SetOptionArgs) String() string

func (*SetOptionArgs) Write

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

type SetOptionResult

type SetOptionResult struct {
}

func NewSetOptionResult

func NewSetOptionResult() *SetOptionResult

func (*SetOptionResult) Read

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

func (*SetOptionResult) String

func (p *SetOptionResult) String() string

func (*SetOptionResult) Write

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

type ShutdownArgs

type ShutdownArgs struct {
}

func NewShutdownArgs

func NewShutdownArgs() *ShutdownArgs

func (*ShutdownArgs) Read

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

func (*ShutdownArgs) String

func (p *ShutdownArgs) String() string

func (*ShutdownArgs) Write

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

type ShutdownResult

type ShutdownResult struct {
}

func NewShutdownResult

func NewShutdownResult() *ShutdownResult

func (*ShutdownResult) Read

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

func (*ShutdownResult) String

func (p *ShutdownResult) String() string

func (*ShutdownResult) Write

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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