atomic

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReadOnlyStore_Integer_Helper = struct {
	// Args accepts the parameters of integer in-order and returns
	// the arguments struct for the function.
	Args func(
		key *string,
	) *ReadOnlyStore_Integer_Args

	// IsException returns true if the given error can be thrown
	// by integer.
	//
	// An error can be thrown by integer only if the
	// corresponding exception type was mentioned in the 'throws'
	// section for it in the Thrift file.
	IsException func(error) bool

	// WrapResponse returns the result struct for integer
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// integer into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by integer
	//
	//   value, err := integer(args)
	//   result, err := ReadOnlyStore_Integer_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from integer: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(int64, error) (*ReadOnlyStore_Integer_Result, error)

	// UnwrapResponse takes the result struct for integer
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if integer threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := ReadOnlyStore_Integer_Helper.UnwrapResponse(result)
	UnwrapResponse func(*ReadOnlyStore_Integer_Result) (int64, error)
}{}

ReadOnlyStore_Integer_Helper provides functions that aid in handling the parameters and return values of the ReadOnlyStore.integer function.

View Source
var Store_CompareAndSwap_Helper = struct {
	// Args accepts the parameters of compareAndSwap in-order and returns
	// the arguments struct for the function.
	Args func(
		request *CompareAndSwap,
	) *Store_CompareAndSwap_Args

	// IsException returns true if the given error can be thrown
	// by compareAndSwap.
	//
	// An error can be thrown by compareAndSwap only if the
	// corresponding exception type was mentioned in the 'throws'
	// section for it in the Thrift file.
	IsException func(error) bool

	// WrapResponse returns the result struct for compareAndSwap
	// given the error returned by it. The provided error may
	// be nil if compareAndSwap did not fail.
	//
	// This allows mapping errors returned by compareAndSwap into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// compareAndSwap
	//
	//   err := compareAndSwap(args)
	//   result, err := Store_CompareAndSwap_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from compareAndSwap: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*Store_CompareAndSwap_Result, error)

	// UnwrapResponse takes the result struct for compareAndSwap
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if compareAndSwap threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := Store_CompareAndSwap_Helper.UnwrapResponse(result)
	UnwrapResponse func(*Store_CompareAndSwap_Result) error
}{}

Store_CompareAndSwap_Helper provides functions that aid in handling the parameters and return values of the Store.compareAndSwap function.

View Source
var Store_Forget_Helper = struct {
	// Args accepts the parameters of forget in-order and returns
	// the arguments struct for the function.
	Args func(
		key *string,
	) *Store_Forget_Args
}{}

Store_Forget_Helper provides functions that aid in handling the parameters and return values of the Store.forget function.

View Source
var Store_Increment_Helper = struct {
	// Args accepts the parameters of increment in-order and returns
	// the arguments struct for the function.
	Args func(
		key *string,
		value *int64,
	) *Store_Increment_Args

	// IsException returns true if the given error can be thrown
	// by increment.
	//
	// An error can be thrown by increment only if the
	// corresponding exception type was mentioned in the 'throws'
	// section for it in the Thrift file.
	IsException func(error) bool

	// WrapResponse returns the result struct for increment
	// given the error returned by it. The provided error may
	// be nil if increment did not fail.
	//
	// This allows mapping errors returned by increment into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// increment
	//
	//   err := increment(args)
	//   result, err := Store_Increment_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from increment: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*Store_Increment_Result, error)

	// UnwrapResponse takes the result struct for increment
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if increment threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := Store_Increment_Helper.UnwrapResponse(result)
	UnwrapResponse func(*Store_Increment_Result) error
}{}

Store_Increment_Helper provides functions that aid in handling the parameters and return values of the Store.increment function.

View Source
var ThriftModule = &thriftreflect.ThriftModule{
	Name:     "atomic",
	Package:  "go.uber.org/yarpc/encoding/thrift/thriftrw-plugin-yarpc/internal/tests/atomic",
	FilePath: "atomic.thrift",
	SHA1:     "2bc145384bb2472af911bf797c7c23331111638a",
	Includes: []*thriftreflect.ThriftModule{
		common.ThriftModule,
	},
	Raw: rawIDL,
}

ThriftModule represents the IDL file used to generate this package.

Functions

This section is empty.

Types

type CompareAndSwap

type CompareAndSwap struct {
	Key          string `json:"key,required"`
	CurrentValue int64  `json:"currentValue,required"`
	NewValue     int64  `json:"newValue,required"`
}

func (*CompareAndSwap) Equals added in v1.8.0

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

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

This function performs a deep comparison.

func (*CompareAndSwap) FromWire

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

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

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

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

func (*CompareAndSwap) String

func (v *CompareAndSwap) String() string

String returns a readable string representation of a CompareAndSwap struct.

func (*CompareAndSwap) ToWire

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

ToWire translates a CompareAndSwap 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 IntegerMismatchError

type IntegerMismatchError struct {
	ExpectedValue int64 `json:"expectedValue,required"`
	GotValue      int64 `json:"gotValue,required"`
}

func (*IntegerMismatchError) Equals added in v1.8.0

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

This function performs a deep comparison.

func (*IntegerMismatchError) Error

func (v *IntegerMismatchError) Error() string

func (*IntegerMismatchError) FromWire

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

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

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

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

func (*IntegerMismatchError) String

func (v *IntegerMismatchError) String() string

String returns a readable string representation of a IntegerMismatchError struct.

func (*IntegerMismatchError) ToWire

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

ToWire translates a IntegerMismatchError 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 KeyDoesNotExist

type KeyDoesNotExist struct {
	Key *string `json:"key,omitempty"`
}

func (*KeyDoesNotExist) Equals added in v1.8.0

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

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

This function performs a deep comparison.

func (*KeyDoesNotExist) Error

func (v *KeyDoesNotExist) Error() string

func (*KeyDoesNotExist) FromWire

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

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

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

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

func (*KeyDoesNotExist) GetKey added in v1.14.0

func (v *KeyDoesNotExist) GetKey() (o string)

GetKey returns the value of Key if it is set or its zero value if it is unset.

func (*KeyDoesNotExist) String

func (v *KeyDoesNotExist) String() string

String returns a readable string representation of a KeyDoesNotExist struct.

func (*KeyDoesNotExist) ToWire

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

ToWire translates a KeyDoesNotExist 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 ReadOnlyStore_Integer_Args added in v1.1.0

type ReadOnlyStore_Integer_Args struct {
	Key *string `json:"key,omitempty"`
}

ReadOnlyStore_Integer_Args represents the arguments for the ReadOnlyStore.integer function.

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

func (*ReadOnlyStore_Integer_Args) EnvelopeType added in v1.1.0

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

EnvelopeType returns the kind of value inside this struct.

This will always be Call for this struct.

func (*ReadOnlyStore_Integer_Args) Equals added in v1.8.0

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

This function performs a deep comparison.

func (*ReadOnlyStore_Integer_Args) FromWire added in v1.1.0

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

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

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

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

func (*ReadOnlyStore_Integer_Args) GetKey added in v1.14.0

func (v *ReadOnlyStore_Integer_Args) GetKey() (o string)

GetKey returns the value of Key if it is set or its zero value if it is unset.

func (*ReadOnlyStore_Integer_Args) MethodName added in v1.1.0

func (v *ReadOnlyStore_Integer_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 "integer" for this struct.

func (*ReadOnlyStore_Integer_Args) String added in v1.1.0

func (v *ReadOnlyStore_Integer_Args) String() string

String returns a readable string representation of a ReadOnlyStore_Integer_Args struct.

func (*ReadOnlyStore_Integer_Args) ToWire added in v1.1.0

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

ToWire translates a ReadOnlyStore_Integer_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 ReadOnlyStore_Integer_Result added in v1.1.0

type ReadOnlyStore_Integer_Result struct {
	// Value returned by integer after a successful execution.
	Success      *int64           `json:"success,omitempty"`
	DoesNotExist *KeyDoesNotExist `json:"doesNotExist,omitempty"`
}

ReadOnlyStore_Integer_Result represents the result of a ReadOnlyStore.integer function call.

The result of a integer execution is sent and received over the wire as this struct.

Success is set only if the function did not throw an exception.

func (*ReadOnlyStore_Integer_Result) EnvelopeType added in v1.1.0

EnvelopeType returns the kind of value inside this struct.

This will always be Reply for this struct.

func (*ReadOnlyStore_Integer_Result) Equals added in v1.8.0

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

This function performs a deep comparison.

func (*ReadOnlyStore_Integer_Result) FromWire added in v1.1.0

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

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

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

func (*ReadOnlyStore_Integer_Result) GetSuccess added in v1.14.0

func (v *ReadOnlyStore_Integer_Result) GetSuccess() (o int64)

GetSuccess returns the value of Success if it is set or its zero value if it is unset.

func (*ReadOnlyStore_Integer_Result) MethodName added in v1.1.0

func (v *ReadOnlyStore_Integer_Result) MethodName() string

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

This will always be "integer" for this struct.

func (*ReadOnlyStore_Integer_Result) String added in v1.1.0

String returns a readable string representation of a ReadOnlyStore_Integer_Result struct.

func (*ReadOnlyStore_Integer_Result) ToWire added in v1.1.0

ToWire translates a ReadOnlyStore_Integer_Result 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 Store_CompareAndSwap_Args

type Store_CompareAndSwap_Args struct {
	Request *CompareAndSwap `json:"request,omitempty"`
}

Store_CompareAndSwap_Args represents the arguments for the Store.compareAndSwap function.

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

func (*Store_CompareAndSwap_Args) EnvelopeType

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

EnvelopeType returns the kind of value inside this struct.

This will always be Call for this struct.

func (*Store_CompareAndSwap_Args) Equals added in v1.8.0

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

This function performs a deep comparison.

func (*Store_CompareAndSwap_Args) FromWire

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

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

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

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

func (*Store_CompareAndSwap_Args) MethodName

func (v *Store_CompareAndSwap_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 "compareAndSwap" for this struct.

func (*Store_CompareAndSwap_Args) String

func (v *Store_CompareAndSwap_Args) String() string

String returns a readable string representation of a Store_CompareAndSwap_Args struct.

func (*Store_CompareAndSwap_Args) ToWire

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

ToWire translates a Store_CompareAndSwap_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 Store_CompareAndSwap_Result

type Store_CompareAndSwap_Result struct {
	Mismatch *IntegerMismatchError `json:"mismatch,omitempty"`
}

Store_CompareAndSwap_Result represents the result of a Store.compareAndSwap function call.

The result of a compareAndSwap execution is sent and received over the wire as this struct.

func (*Store_CompareAndSwap_Result) EnvelopeType

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

EnvelopeType returns the kind of value inside this struct.

This will always be Reply for this struct.

func (*Store_CompareAndSwap_Result) Equals added in v1.8.0

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

This function performs a deep comparison.

func (*Store_CompareAndSwap_Result) FromWire

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

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

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

func (*Store_CompareAndSwap_Result) MethodName

func (v *Store_CompareAndSwap_Result) MethodName() string

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

This will always be "compareAndSwap" for this struct.

func (*Store_CompareAndSwap_Result) String

func (v *Store_CompareAndSwap_Result) String() string

String returns a readable string representation of a Store_CompareAndSwap_Result struct.

func (*Store_CompareAndSwap_Result) ToWire

ToWire translates a Store_CompareAndSwap_Result 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 Store_Forget_Args

type Store_Forget_Args struct {
	Key *string `json:"key,omitempty"`
}

Store_Forget_Args represents the arguments for the Store.forget function.

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

func (*Store_Forget_Args) EnvelopeType

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

EnvelopeType returns the kind of value inside this struct.

This will always be OneWay for this struct.

func (*Store_Forget_Args) Equals added in v1.8.0

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

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

This function performs a deep comparison.

func (*Store_Forget_Args) FromWire

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

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

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

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

func (*Store_Forget_Args) GetKey added in v1.14.0

func (v *Store_Forget_Args) GetKey() (o string)

GetKey returns the value of Key if it is set or its zero value if it is unset.

func (*Store_Forget_Args) MethodName

func (v *Store_Forget_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 "forget" for this struct.

func (*Store_Forget_Args) String

func (v *Store_Forget_Args) String() string

String returns a readable string representation of a Store_Forget_Args struct.

func (*Store_Forget_Args) ToWire

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

ToWire translates a Store_Forget_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 Store_Increment_Args

type Store_Increment_Args struct {
	Key   *string `json:"key,omitempty"`
	Value *int64  `json:"value,omitempty"`
}

Store_Increment_Args represents the arguments for the Store.increment function.

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

func (*Store_Increment_Args) EnvelopeType

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

EnvelopeType returns the kind of value inside this struct.

This will always be Call for this struct.

func (*Store_Increment_Args) Equals added in v1.8.0

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

This function performs a deep comparison.

func (*Store_Increment_Args) FromWire

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

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

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

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

func (*Store_Increment_Args) GetKey added in v1.14.0

func (v *Store_Increment_Args) GetKey() (o string)

GetKey returns the value of Key if it is set or its zero value if it is unset.

func (*Store_Increment_Args) GetValue added in v1.14.0

func (v *Store_Increment_Args) GetValue() (o int64)

GetValue returns the value of Value if it is set or its zero value if it is unset.

func (*Store_Increment_Args) MethodName

func (v *Store_Increment_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 "increment" for this struct.

func (*Store_Increment_Args) String

func (v *Store_Increment_Args) String() string

String returns a readable string representation of a Store_Increment_Args struct.

func (*Store_Increment_Args) ToWire

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

ToWire translates a Store_Increment_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 Store_Increment_Result

type Store_Increment_Result struct {
}

Store_Increment_Result represents the result of a Store.increment function call.

The result of a increment execution is sent and received over the wire as this struct.

func (*Store_Increment_Result) EnvelopeType

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

EnvelopeType returns the kind of value inside this struct.

This will always be Reply for this struct.

func (*Store_Increment_Result) Equals added in v1.8.0

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

This function performs a deep comparison.

func (*Store_Increment_Result) FromWire

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

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

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

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

func (*Store_Increment_Result) MethodName

func (v *Store_Increment_Result) MethodName() string

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

This will always be "increment" for this struct.

func (*Store_Increment_Result) String

func (v *Store_Increment_Result) String() string

String returns a readable string representation of a Store_Increment_Result struct.

func (*Store_Increment_Result) ToWire

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

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

Jump to

Keyboard shortcuts

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