Documentation

Index

Constants

This section is empty.

Variables

View Source
var ThriftModule = &thriftreflect.ThriftModule{
	Name:     "internal",
	Package:  "go.uber.org/yarpc/serialize/internal",
	FilePath: "internal.thrift",
	SHA1:     "c60c5759efeaa1545aebd396d371509bc561b153",
	Raw:      rawIDL,
}

    ThriftModule represents the IDL file used to generate this package.

    Functions

    This section is empty.

    Types

    type RPC

    type RPC struct {
    	SpanContext     []byte            `json:"spanContext,required"`
    	CallerName      string            `json:"callerName,required"`
    	ServiceName     string            `json:"serviceName,required"`
    	Encoding        string            `json:"encoding,required"`
    	Procedure       string            `json:"procedure,required"`
    	Headers         map[string]string `json:"headers,omitempty"`
    	ShardKey        *string           `json:"shardKey,omitempty"`
    	RoutingKey      *string           `json:"routingKey,omitempty"`
    	RoutingDelegate *string           `json:"routingDelegate,omitempty"`
    	Body            []byte            `json:"body,omitempty"`
    }

    func (*RPC) Equals

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

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

      This function performs a deep comparison.

      func (*RPC) FromWire

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

        FromWire deserializes a RPC 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 RPC struct from the provided intermediate representation.

        x, err := binaryProtocol.Decode(reader, wire.TStruct)
        if err != nil {
          return nil, err
        }
        
        var v RPC
        if err := v.FromWire(x); err != nil {
          return nil, err
        }
        return &v, nil
        

        func (*RPC) GetBody

        func (v *RPC) GetBody() (o []byte)

          GetBody returns the value of Body if it is set or its zero value if it is unset.

          func (*RPC) GetCallerName

          func (v *RPC) GetCallerName() (o string)

            GetCallerName returns the value of CallerName if it is set or its zero value if it is unset.

            func (*RPC) GetEncoding

            func (v *RPC) GetEncoding() (o string)

              GetEncoding returns the value of Encoding if it is set or its zero value if it is unset.

              func (*RPC) GetHeaders

              func (v *RPC) GetHeaders() (o map[string]string)

                GetHeaders returns the value of Headers if it is set or its zero value if it is unset.

                func (*RPC) GetProcedure

                func (v *RPC) GetProcedure() (o string)

                  GetProcedure returns the value of Procedure if it is set or its zero value if it is unset.

                  func (*RPC) GetRoutingDelegate

                  func (v *RPC) GetRoutingDelegate() (o string)

                    GetRoutingDelegate returns the value of RoutingDelegate if it is set or its zero value if it is unset.

                    func (*RPC) GetRoutingKey

                    func (v *RPC) GetRoutingKey() (o string)

                      GetRoutingKey returns the value of RoutingKey if it is set or its zero value if it is unset.

                      func (*RPC) GetServiceName

                      func (v *RPC) GetServiceName() (o string)

                        GetServiceName returns the value of ServiceName if it is set or its zero value if it is unset.

                        func (*RPC) GetShardKey

                        func (v *RPC) GetShardKey() (o string)

                          GetShardKey returns the value of ShardKey if it is set or its zero value if it is unset.

                          func (*RPC) GetSpanContext

                          func (v *RPC) GetSpanContext() (o []byte)

                            GetSpanContext returns the value of SpanContext if it is set or its zero value if it is unset.

                            func (*RPC) IsSetBody

                            func (v *RPC) IsSetBody() bool

                              IsSetBody returns true if Body is not nil.

                              func (*RPC) IsSetHeaders

                              func (v *RPC) IsSetHeaders() bool

                                IsSetHeaders returns true if Headers is not nil.

                                func (*RPC) IsSetRoutingDelegate

                                func (v *RPC) IsSetRoutingDelegate() bool

                                  IsSetRoutingDelegate returns true if RoutingDelegate is not nil.

                                  func (*RPC) IsSetRoutingKey

                                  func (v *RPC) IsSetRoutingKey() bool

                                    IsSetRoutingKey returns true if RoutingKey is not nil.

                                    func (*RPC) IsSetShardKey

                                    func (v *RPC) IsSetShardKey() bool

                                      IsSetShardKey returns true if ShardKey is not nil.

                                      func (*RPC) IsSetSpanContext

                                      func (v *RPC) IsSetSpanContext() bool

                                        IsSetSpanContext returns true if SpanContext is not nil.

                                        func (*RPC) MarshalLogObject

                                        func (v *RPC) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

                                          MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of RPC.

                                          func (*RPC) String

                                          func (v *RPC) String() string

                                            String returns a readable string representation of a RPC struct.

                                            func (*RPC) ToWire

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

                                              ToWire translates a RPC 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
                                              }
                                              

                                              Source Files