sink

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Hello_Sink_Helper = struct {
	// Args accepts the parameters of sink in-order and returns
	// the arguments struct for the function.
	Args func(
		snk *SinkRequest,
	) *Hello_Sink_Args
}{}

Hello_Sink_Helper provides functions that aid in handling the parameters and return values of the Hello.sink function.

View Source
var ThriftModule = &thriftreflect.ThriftModule{
	Name:     "sink",
	Package:  "go.uber.org/yarpc/internal/examples/thrift-oneway/sink",
	FilePath: "sink.thrift",
	SHA1:     "f723dc578c8ae4251c75f873a5a24b6c1a9df61f",
	Raw:      rawIDL,
}

ThriftModule represents the IDL file used to generate this package.

Functions

This section is empty.

Types

type Hello_Sink_Args

type Hello_Sink_Args struct {
	Snk *SinkRequest `json:"snk,omitempty"`
}

Hello_Sink_Args represents the arguments for the Hello.sink function.

The arguments for sink are sent and received over the wire as this struct.

func (*Hello_Sink_Args) EnvelopeType

func (v *Hello_Sink_Args) EnvelopeType() wire.EnvelopeType

EnvelopeType returns the kind of value inside this struct.

This will always be OneWay for this struct.

func (*Hello_Sink_Args) Equals added in v1.8.0

func (v *Hello_Sink_Args) Equals(rhs *Hello_Sink_Args) bool

Equals returns true if all the fields of this Hello_Sink_Args match the provided Hello_Sink_Args.

This function performs a deep comparison.

func (*Hello_Sink_Args) FromWire

func (v *Hello_Sink_Args) FromWire(w wire.Value) error

FromWire deserializes a Hello_Sink_Args struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a Hello_Sink_Args struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v Hello_Sink_Args
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*Hello_Sink_Args) MethodName

func (v *Hello_Sink_Args) MethodName() string

MethodName returns the name of the Thrift function as specified in the IDL, for which this struct represent the arguments.

This will always be "sink" for this struct.

func (*Hello_Sink_Args) String

func (v *Hello_Sink_Args) String() string

String returns a readable string representation of a Hello_Sink_Args struct.

func (*Hello_Sink_Args) ToWire

func (v *Hello_Sink_Args) ToWire() (wire.Value, error)

ToWire translates a Hello_Sink_Args struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type SinkRequest

type SinkRequest struct {
	Message string `json:"message,required"`
}

func (*SinkRequest) Equals added in v1.8.0

func (v *SinkRequest) Equals(rhs *SinkRequest) bool

Equals returns true if all the fields of this SinkRequest match the provided SinkRequest.

This function performs a deep comparison.

func (*SinkRequest) FromWire

func (v *SinkRequest) FromWire(w wire.Value) error

FromWire deserializes a SinkRequest struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a SinkRequest struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v SinkRequest
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*SinkRequest) String

func (v *SinkRequest) String() string

String returns a readable string representation of a SinkRequest struct.

func (*SinkRequest) ToWire

func (v *SinkRequest) ToWire() (wire.Value, error)

ToWire translates a SinkRequest struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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