message

package
v0.0.0-...-a32d5fc Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Message_Compression_TypeID = 0xf8f433c185247295

Message_Compression_TypeID is the unique identifier for the type Message_Compression.

View Source
const Message_TypeID = 0xc768aaf640842a35

Message_TypeID is the unique identifier for the type Message.

View Source
const Ping_TypeID = 0x9bce611bc724ff89

Ping_TypeID is the unique identifier for the type Ping.

View Source
const Pong_TypeID = 0xf6486a286fedf2f6

Pong_TypeID is the unique identifier for the type Pong.

View Source
const SupportedMessageTypes_Request_TypeID = 0x80b38fdd614a8b73

SupportedMessageTypes_Request_TypeID is the unique identifier for the type SupportedMessageTypes_Request.

View Source
const SupportedMessageTypes_Response_TypeID = 0x87799f37b0d1886a

SupportedMessageTypes_Response_TypeID is the unique identifier for the type SupportedMessageTypes_Response.

View Source
const SupportedMessageTypes_TypeID = 0xf56d6f421703b1f7

SupportedMessageTypes_TypeID is the unique identifier for the type SupportedMessageTypes.

Variables

View Source
var (
	ErrNoData = errors.New("Message has no data")
)

Functions

func Data

func Data(msg *Message) (*capnp.Message, error)

Data returns the message data as a capnp.Message.

errors:

  • ERR_NODATA
  • capnp errors

func SetData

func SetData(msg *Message, data *capnp.Message) error

SetData will compress the data based on the message's compression setting

Types

type Message

type Message struct{ capnp.Struct }

func NewMessage

func NewMessage(s *capnp.Segment) (Message, error)

func NewRootMessage

func NewRootMessage(s *capnp.Segment) (Message, error)

func ReadRootMessage

func ReadRootMessage(msg *capnp.Message) (Message, error)

func (Message) Compression

func (s Message) Compression() Message_Compression

func (Message) CorrelationID

func (s Message) CorrelationID() uint64

func (Message) Data

func (s Message) Data() ([]byte, error)

func (Message) Deadline

func (s Message) Deadline() Message_deadline

func (Message) HasData

func (s Message) HasData() bool

func (Message) Id

func (s Message) Id() uint64

func (Message) Packed

func (s Message) Packed() bool

func (Message) SetCompression

func (s Message) SetCompression(v Message_Compression)

func (Message) SetCorrelationID

func (s Message) SetCorrelationID(v uint64)

func (Message) SetData

func (s Message) SetData(v []byte) error

func (Message) SetId

func (s Message) SetId(v uint64)

func (Message) SetPacked

func (s Message) SetPacked(v bool)

func (Message) SetTimestamp

func (s Message) SetTimestamp(v int64)

func (Message) SetType

func (s Message) SetType(v uint64)

func (Message) String

func (s Message) String() string

func (Message) Timestamp

func (s Message) Timestamp() int64

func (Message) Type

func (s Message) Type() uint64

type Message_Compression

type Message_Compression uint16
const (
	Message_Compression_none Message_Compression = 0
	Message_Compression_zlib Message_Compression = 1
)

Values of Message_Compression.

func Message_CompressionFromString

func Message_CompressionFromString(c string) Message_Compression

Message_CompressionFromString returns the enum value with a name, or the zero value if there's no such value.

func (Message_Compression) String

func (c Message_Compression) String() string

String returns the enum's constant name.

type Message_Compression_List

type Message_Compression_List struct{ capnp.List }

func NewMessage_Compression_List

func NewMessage_Compression_List(s *capnp.Segment, sz int32) (Message_Compression_List, error)

func (Message_Compression_List) At

func (Message_Compression_List) Set

type Message_List

type Message_List struct{ capnp.List }

Message_List is a list of Message.

func NewMessage_List

func NewMessage_List(s *capnp.Segment, sz int32) (Message_List, error)

NewMessage creates a new list of Message.

func (Message_List) At

func (s Message_List) At(i int) Message

func (Message_List) Set

func (s Message_List) Set(i int, v Message) error

func (Message_List) String

func (s Message_List) String() string

type Message_Promise

type Message_Promise struct{ *capnp.Pipeline }

Message_Promise is a wrapper for a Message promised by a client call.

func (Message_Promise) Deadline

func (Message_Promise) Struct

func (p Message_Promise) Struct() (Message, error)

type Message_deadline

type Message_deadline Message

func (Message_deadline) ExpiresOn

func (s Message_deadline) ExpiresOn() int64

func (Message_deadline) SetExpiresOn

func (s Message_deadline) SetExpiresOn(v int64)

func (Message_deadline) SetTimeoutMSec

func (s Message_deadline) SetTimeoutMSec(v uint16)

func (Message_deadline) TimeoutMSec

func (s Message_deadline) TimeoutMSec() uint16

func (Message_deadline) Which

type Message_deadline_Promise

type Message_deadline_Promise struct{ *capnp.Pipeline }

Message_deadline_Promise is a wrapper for a Message_deadline promised by a client call.

func (Message_deadline_Promise) Struct

type Message_deadline_Which

type Message_deadline_Which uint16
const (
	Message_deadline_Which_timeoutMSec Message_deadline_Which = 0
	Message_deadline_Which_expiresOn   Message_deadline_Which = 1
)

func (Message_deadline_Which) String

func (w Message_deadline_Which) String() string

type Ping

type Ping struct{ capnp.Struct }

func NewPing

func NewPing(s *capnp.Segment) (Ping, error)

func NewRootPing

func NewRootPing(s *capnp.Segment) (Ping, error)

func ReadRootPing

func ReadRootPing(msg *capnp.Message) (Ping, error)

func (Ping) String

func (s Ping) String() string

type Ping_List

type Ping_List struct{ capnp.List }

Ping_List is a list of Ping.

func NewPing_List

func NewPing_List(s *capnp.Segment, sz int32) (Ping_List, error)

NewPing creates a new list of Ping.

func (Ping_List) At

func (s Ping_List) At(i int) Ping

func (Ping_List) Set

func (s Ping_List) Set(i int, v Ping) error

func (Ping_List) String

func (s Ping_List) String() string

type Ping_Promise

type Ping_Promise struct{ *capnp.Pipeline }

Ping_Promise is a wrapper for a Ping promised by a client call.

func (Ping_Promise) Struct

func (p Ping_Promise) Struct() (Ping, error)

type Pong

type Pong struct{ capnp.Struct }

func NewPong

func NewPong(s *capnp.Segment) (Pong, error)

func NewRootPong

func NewRootPong(s *capnp.Segment) (Pong, error)

func ReadRootPong

func ReadRootPong(msg *capnp.Message) (Pong, error)

func (Pong) String

func (s Pong) String() string

type Pong_List

type Pong_List struct{ capnp.List }

Pong_List is a list of Pong.

func NewPong_List

func NewPong_List(s *capnp.Segment, sz int32) (Pong_List, error)

NewPong creates a new list of Pong.

func (Pong_List) At

func (s Pong_List) At(i int) Pong

func (Pong_List) Set

func (s Pong_List) Set(i int, v Pong) error

func (Pong_List) String

func (s Pong_List) String() string

type Pong_Promise

type Pong_Promise struct{ *capnp.Pipeline }

Pong_Promise is a wrapper for a Pong promised by a client call.

func (Pong_Promise) Struct

func (p Pong_Promise) Struct() (Pong, error)

type SupportedMessageTypes

type SupportedMessageTypes struct{ capnp.Struct }

func NewRootSupportedMessageTypes

func NewRootSupportedMessageTypes(s *capnp.Segment) (SupportedMessageTypes, error)

func NewSupportedMessageTypes

func NewSupportedMessageTypes(s *capnp.Segment) (SupportedMessageTypes, error)

func ReadRootSupportedMessageTypes

func ReadRootSupportedMessageTypes(msg *capnp.Message) (SupportedMessageTypes, error)

func (SupportedMessageTypes) String

func (s SupportedMessageTypes) String() string

type SupportedMessageTypes_List

type SupportedMessageTypes_List struct{ capnp.List }

SupportedMessageTypes_List is a list of SupportedMessageTypes.

func NewSupportedMessageTypes_List

func NewSupportedMessageTypes_List(s *capnp.Segment, sz int32) (SupportedMessageTypes_List, error)

NewSupportedMessageTypes creates a new list of SupportedMessageTypes.

func (SupportedMessageTypes_List) At

func (SupportedMessageTypes_List) Set

func (SupportedMessageTypes_List) String

type SupportedMessageTypes_Promise

type SupportedMessageTypes_Promise struct{ *capnp.Pipeline }

SupportedMessageTypes_Promise is a wrapper for a SupportedMessageTypes promised by a client call.

func (SupportedMessageTypes_Promise) Struct

type SupportedMessageTypes_Request

type SupportedMessageTypes_Request struct{ capnp.Struct }

func NewRootSupportedMessageTypes_Request

func NewRootSupportedMessageTypes_Request(s *capnp.Segment) (SupportedMessageTypes_Request, error)

func NewSupportedMessageTypes_Request

func NewSupportedMessageTypes_Request(s *capnp.Segment) (SupportedMessageTypes_Request, error)

func ReadRootSupportedMessageTypes_Request

func ReadRootSupportedMessageTypes_Request(msg *capnp.Message) (SupportedMessageTypes_Request, error)

func (SupportedMessageTypes_Request) String

type SupportedMessageTypes_Request_List

type SupportedMessageTypes_Request_List struct{ capnp.List }

SupportedMessageTypes_Request_List is a list of SupportedMessageTypes_Request.

func NewSupportedMessageTypes_Request_List

func NewSupportedMessageTypes_Request_List(s *capnp.Segment, sz int32) (SupportedMessageTypes_Request_List, error)

NewSupportedMessageTypes_Request creates a new list of SupportedMessageTypes_Request.

func (SupportedMessageTypes_Request_List) At

func (SupportedMessageTypes_Request_List) Set

func (SupportedMessageTypes_Request_List) String

type SupportedMessageTypes_Request_Promise

type SupportedMessageTypes_Request_Promise struct{ *capnp.Pipeline }

SupportedMessageTypes_Request_Promise is a wrapper for a SupportedMessageTypes_Request promised by a client call.

func (SupportedMessageTypes_Request_Promise) Struct

type SupportedMessageTypes_Response

type SupportedMessageTypes_Response struct{ capnp.Struct }

func NewRootSupportedMessageTypes_Response

func NewRootSupportedMessageTypes_Response(s *capnp.Segment) (SupportedMessageTypes_Response, error)

func NewSupportedMessageTypes_Response

func NewSupportedMessageTypes_Response(s *capnp.Segment) (SupportedMessageTypes_Response, error)

func ReadRootSupportedMessageTypes_Response

func ReadRootSupportedMessageTypes_Response(msg *capnp.Message) (SupportedMessageTypes_Response, error)

func (SupportedMessageTypes_Response) HasTypes

func (s SupportedMessageTypes_Response) HasTypes() bool

func (SupportedMessageTypes_Response) NewTypes

NewTypes sets the types field to a newly allocated capnp.UInt64List, preferring placement in s's segment.

func (SupportedMessageTypes_Response) SetTypes

func (SupportedMessageTypes_Response) String

func (SupportedMessageTypes_Response) Types

type SupportedMessageTypes_Response_List

type SupportedMessageTypes_Response_List struct{ capnp.List }

SupportedMessageTypes_Response_List is a list of SupportedMessageTypes_Response.

func NewSupportedMessageTypes_Response_List

func NewSupportedMessageTypes_Response_List(s *capnp.Segment, sz int32) (SupportedMessageTypes_Response_List, error)

NewSupportedMessageTypes_Response creates a new list of SupportedMessageTypes_Response.

func (SupportedMessageTypes_Response_List) At

func (SupportedMessageTypes_Response_List) Set

func (SupportedMessageTypes_Response_List) String

type SupportedMessageTypes_Response_Promise

type SupportedMessageTypes_Response_Promise struct{ *capnp.Pipeline }

SupportedMessageTypes_Response_Promise is a wrapper for a SupportedMessageTypes_Response promised by a client call.

func (SupportedMessageTypes_Response_Promise) Struct

type UnsupportedCompressionError

type UnsupportedCompressionError struct {
	Message_Compression
}

func (UnsupportedCompressionError) Error

Jump to

Keyboard shortcuts

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