hyperbahn

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2016 License: MIT, MIT Imports: 4 Imported by: 0

Documentation

Overview

Package hyperbahn is generated code used to make or handle TChannel calls using Thrift.

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int
View Source
var IpAddress_Ipv4_DEFAULT int32

Functions

func NewTChanHyperbahnInheritedClient

func NewTChanHyperbahnInheritedClient(thriftService string, client thrift.TChanClient) *tchanHyperbahnClient

func NewTChanHyperbahnServer

func NewTChanHyperbahnServer(handler TChanHyperbahn) thrift.TChanServer

NewTChanHyperbahnServer wraps a handler for TChanHyperbahn so it can be registered with a thrift.Server.

Types

type DiscoveryQuery

type DiscoveryQuery struct {
	ServiceName string `thrift:"serviceName,1,required" json:"serviceName"`
}

Attributes:

  • ServiceName
var HyperbahnDiscoverArgs_Query_DEFAULT *DiscoveryQuery

func NewDiscoveryQuery

func NewDiscoveryQuery() *DiscoveryQuery

func (*DiscoveryQuery) GetServiceName

func (p *DiscoveryQuery) GetServiceName() string

func (*DiscoveryQuery) Read

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

func (*DiscoveryQuery) String

func (p *DiscoveryQuery) String() string

func (*DiscoveryQuery) Write

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

type DiscoveryResult_

type DiscoveryResult_ struct {
	Peers []*ServicePeer `thrift:"peers,1,required" json:"peers"`
}

Attributes:

  • Peers
var HyperbahnDiscoverResult_Success_DEFAULT *DiscoveryResult_

func NewDiscoveryResult_

func NewDiscoveryResult_() *DiscoveryResult_

func (*DiscoveryResult_) GetPeers

func (p *DiscoveryResult_) GetPeers() []*ServicePeer

func (*DiscoveryResult_) Read

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

func (*DiscoveryResult_) String

func (p *DiscoveryResult_) String() string

func (*DiscoveryResult_) Write

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

type Hyperbahn

type Hyperbahn interface {
	// Parameters:
	//  - Query
	Discover(query *DiscoveryQuery) (r *DiscoveryResult_, err error)
}

type HyperbahnClient

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

func NewHyperbahnClientProtocol

func NewHyperbahnClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *HyperbahnClient

func (*HyperbahnClient) Discover

func (p *HyperbahnClient) Discover(query *DiscoveryQuery) (r *DiscoveryResult_, err error)

Parameters:

  • Query

type HyperbahnDiscoverArgs

type HyperbahnDiscoverArgs struct {
	Query *DiscoveryQuery `thrift:"query,1,required" json:"query"`
}

Attributes:

  • Query

func NewHyperbahnDiscoverArgs

func NewHyperbahnDiscoverArgs() *HyperbahnDiscoverArgs

func (*HyperbahnDiscoverArgs) GetQuery

func (p *HyperbahnDiscoverArgs) GetQuery() *DiscoveryQuery

func (*HyperbahnDiscoverArgs) IsSetQuery

func (p *HyperbahnDiscoverArgs) IsSetQuery() bool

func (*HyperbahnDiscoverArgs) Read

func (*HyperbahnDiscoverArgs) String

func (p *HyperbahnDiscoverArgs) String() string

func (*HyperbahnDiscoverArgs) Write

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

type HyperbahnDiscoverResult

type HyperbahnDiscoverResult struct {
	Success            *DiscoveryResult_   `thrift:"success,0" json:"success,omitempty"`
	NoPeersAvailable   *NoPeersAvailable   `thrift:"noPeersAvailable,1" json:"noPeersAvailable,omitempty"`
	InvalidServiceName *InvalidServiceName `thrift:"invalidServiceName,2" json:"invalidServiceName,omitempty"`
}

Attributes:

  • Success
  • NoPeersAvailable
  • InvalidServiceName

func NewHyperbahnDiscoverResult

func NewHyperbahnDiscoverResult() *HyperbahnDiscoverResult

func (*HyperbahnDiscoverResult) GetInvalidServiceName

func (p *HyperbahnDiscoverResult) GetInvalidServiceName() *InvalidServiceName

func (*HyperbahnDiscoverResult) GetNoPeersAvailable

func (p *HyperbahnDiscoverResult) GetNoPeersAvailable() *NoPeersAvailable

func (*HyperbahnDiscoverResult) GetSuccess

func (p *HyperbahnDiscoverResult) GetSuccess() *DiscoveryResult_

func (*HyperbahnDiscoverResult) IsSetInvalidServiceName

func (p *HyperbahnDiscoverResult) IsSetInvalidServiceName() bool

func (*HyperbahnDiscoverResult) IsSetNoPeersAvailable

func (p *HyperbahnDiscoverResult) IsSetNoPeersAvailable() bool

func (*HyperbahnDiscoverResult) IsSetSuccess

func (p *HyperbahnDiscoverResult) IsSetSuccess() bool

func (*HyperbahnDiscoverResult) Read

func (*HyperbahnDiscoverResult) String

func (p *HyperbahnDiscoverResult) String() string

func (*HyperbahnDiscoverResult) Write

type HyperbahnProcessor

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

func NewHyperbahnProcessor

func NewHyperbahnProcessor(handler Hyperbahn) *HyperbahnProcessor

func (*HyperbahnProcessor) AddToProcessorMap

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

func (*HyperbahnProcessor) GetProcessorFunction

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

func (*HyperbahnProcessor) Process

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

func (*HyperbahnProcessor) ProcessorMap

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

type InvalidServiceName

type InvalidServiceName struct {
	Message     string `thrift:"message,1,required" json:"message"`
	ServiceName string `thrift:"serviceName,2,required" json:"serviceName"`
}

Attributes:

  • Message
  • ServiceName
var HyperbahnDiscoverResult_InvalidServiceName_DEFAULT *InvalidServiceName

func NewInvalidServiceName

func NewInvalidServiceName() *InvalidServiceName

func (*InvalidServiceName) Error

func (p *InvalidServiceName) Error() string

func (*InvalidServiceName) GetMessage

func (p *InvalidServiceName) GetMessage() string

func (*InvalidServiceName) GetServiceName

func (p *InvalidServiceName) GetServiceName() string

func (*InvalidServiceName) Read

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

func (*InvalidServiceName) String

func (p *InvalidServiceName) String() string

func (*InvalidServiceName) Write

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

type IpAddress

type IpAddress struct {
	Ipv4 *int32 `thrift:"ipv4,1" json:"ipv4,omitempty"`
}

Attributes:

  • Ipv4
var ServicePeer_IP_DEFAULT *IpAddress

func NewIpAddress

func NewIpAddress() *IpAddress

func (*IpAddress) CountSetFieldsIpAddress

func (p *IpAddress) CountSetFieldsIpAddress() int

func (*IpAddress) GetIpv4

func (p *IpAddress) GetIpv4() int32

func (*IpAddress) IsSetIpv4

func (p *IpAddress) IsSetIpv4() bool

func (*IpAddress) Read

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

func (*IpAddress) String

func (p *IpAddress) String() string

func (*IpAddress) Write

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

type NoPeersAvailable

type NoPeersAvailable struct {
	Message     string `thrift:"message,1,required" json:"message"`
	ServiceName string `thrift:"serviceName,2,required" json:"serviceName"`
}

Attributes:

  • Message
  • ServiceName
var HyperbahnDiscoverResult_NoPeersAvailable_DEFAULT *NoPeersAvailable

func NewNoPeersAvailable

func NewNoPeersAvailable() *NoPeersAvailable

func (*NoPeersAvailable) Error

func (p *NoPeersAvailable) Error() string

func (*NoPeersAvailable) GetMessage

func (p *NoPeersAvailable) GetMessage() string

func (*NoPeersAvailable) GetServiceName

func (p *NoPeersAvailable) GetServiceName() string

func (*NoPeersAvailable) Read

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

func (*NoPeersAvailable) String

func (p *NoPeersAvailable) String() string

func (*NoPeersAvailable) Write

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

type ServicePeer

type ServicePeer struct {
	IP   *IpAddress `thrift:"ip,1,required" json:"ip"`
	Port int32      `thrift:"port,2,required" json:"port"`
}

Attributes:

  • IP
  • Port

func NewServicePeer

func NewServicePeer() *ServicePeer

func (*ServicePeer) GetIP

func (p *ServicePeer) GetIP() *IpAddress

func (*ServicePeer) GetPort

func (p *ServicePeer) GetPort() int32

func (*ServicePeer) IsSetIP

func (p *ServicePeer) IsSetIP() bool

func (*ServicePeer) Read

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

func (*ServicePeer) String

func (p *ServicePeer) String() string

func (*ServicePeer) Write

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

type TChanHyperbahn

type TChanHyperbahn interface {
	Discover(ctx thrift.Context, query *DiscoveryQuery) (*DiscoveryResult_, error)
}

TChanHyperbahn is the interface that defines the server handler and client interface.

func NewTChanHyperbahnClient

func NewTChanHyperbahnClient(client thrift.TChanClient) TChanHyperbahn

NewTChanHyperbahnClient creates a client that can be used to make remote calls.

Jump to

Keyboard shortcuts

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