hyperbahn

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2017 License: 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" db:"serviceName" 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) ReadField1 added in v1.0.8

func (p *DiscoveryQuery) ReadField1(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" db:"peers" 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_) ReadField1 added in v1.0.8

func (p *DiscoveryResult_) ReadField1(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" db:"query" 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) ReadField1 added in v1.0.8

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

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" db:"success" json:"success,omitempty"`
	NoPeersAvailable   *NoPeersAvailable   `thrift:"noPeersAvailable,1" db:"noPeersAvailable" json:"noPeersAvailable,omitempty"`
	InvalidServiceName *InvalidServiceName `thrift:"invalidServiceName,2" db:"invalidServiceName" 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) ReadField0 added in v1.0.8

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

func (*HyperbahnDiscoverResult) ReadField1 added in v1.0.8

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

func (*HyperbahnDiscoverResult) ReadField2 added in v1.0.8

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

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" db:"message" json:"message"`
	ServiceName string `thrift:"serviceName,2,required" db:"serviceName" 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) ReadField1 added in v1.0.8

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

func (*InvalidServiceName) ReadField2 added in v1.0.8

func (p *InvalidServiceName) ReadField2(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" db:"ipv4" 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) ReadField1 added in v1.0.8

func (p *IpAddress) ReadField1(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" db:"message" json:"message"`
	ServiceName string `thrift:"serviceName,2,required" db:"serviceName" 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) ReadField1 added in v1.0.8

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

func (*NoPeersAvailable) ReadField2 added in v1.0.8

func (p *NoPeersAvailable) ReadField2(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" db:"ip" json:"ip"`
	Port int32      `thrift:"port,2,required" db:"port" 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) ReadField1 added in v1.0.8

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

func (*ServicePeer) ReadField2 added in v1.0.8

func (p *ServicePeer) ReadField2(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