Documentation ¶
Index ¶
- Constants
- func Echoer_Methods(methods []server.Method, s Echoer_Server) []server.Method
- func Echoer_NewServer(s Echoer_Server) *server.Server
- func RegisterSchema(reg *schemas.Registry)
- func Streamer_Methods(methods []server.Method, s Streamer_Server) []server.Method
- func Streamer_NewServer(s Streamer_Server) *server.Server
- type Echoer
- func (c Echoer) AddRef() Echoer
- func (Echoer) DecodeFromPtr(p capnp.Ptr) Echoer
- func (c Echoer) Echo(ctx context.Context, params func(Echoer_echo_Params) error) (Echoer_echo_Results_Future, capnp.ReleaseFunc)
- func (c Echoer) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr
- func (c Echoer) GetFlowLimiter() fc.FlowLimiter
- func (c Echoer) IsSame(other Echoer) bool
- func (c Echoer) IsValid() bool
- func (c Echoer) Release()
- func (c Echoer) Resolve(ctx context.Context) error
- func (c Echoer) SetFlowLimiter(lim fc.FlowLimiter)
- func (c Echoer) String() string
- func (c Echoer) WaitStreaming() error
- type Echoer_List
- type Echoer_Server
- type Echoer_echo
- type Echoer_echo_Params
- func (Echoer_echo_Params) DecodeFromPtr(p capnp.Ptr) Echoer_echo_Params
- func (s Echoer_echo_Params) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr
- func (s Echoer_echo_Params) HasPayload() bool
- func (s Echoer_echo_Params) IsValid() bool
- func (s Echoer_echo_Params) Message() *capnp.Message
- func (s Echoer_echo_Params) Payload() (string, error)
- func (s Echoer_echo_Params) PayloadBytes() ([]byte, error)
- func (s Echoer_echo_Params) Segment() *capnp.Segment
- func (s Echoer_echo_Params) SetPayload(v string) error
- func (s Echoer_echo_Params) String() string
- func (s Echoer_echo_Params) ToPtr() capnp.Ptr
- type Echoer_echo_Params_Future
- type Echoer_echo_Params_List
- type Echoer_echo_Results
- func (Echoer_echo_Results) DecodeFromPtr(p capnp.Ptr) Echoer_echo_Results
- func (s Echoer_echo_Results) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr
- func (s Echoer_echo_Results) HasResult() bool
- func (s Echoer_echo_Results) IsValid() bool
- func (s Echoer_echo_Results) Message() *capnp.Message
- func (s Echoer_echo_Results) Result() (string, error)
- func (s Echoer_echo_Results) ResultBytes() ([]byte, error)
- func (s Echoer_echo_Results) Segment() *capnp.Segment
- func (s Echoer_echo_Results) SetResult(v string) error
- func (s Echoer_echo_Results) String() string
- func (s Echoer_echo_Results) ToPtr() capnp.Ptr
- type Echoer_echo_Results_Future
- type Echoer_echo_Results_List
- type Streamer
- func (c Streamer) AddRef() Streamer
- func (Streamer) DecodeFromPtr(p capnp.Ptr) Streamer
- func (c Streamer) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr
- func (c Streamer) GetFlowLimiter() fc.FlowLimiter
- func (c Streamer) IsSame(other Streamer) bool
- func (c Streamer) IsValid() bool
- func (c Streamer) Recv(ctx context.Context, params func(Streamer_recv_Params) error) error
- func (c Streamer) Release()
- func (c Streamer) Resolve(ctx context.Context) error
- func (c Streamer) SetFlowLimiter(lim fc.FlowLimiter)
- func (c Streamer) String() string
- func (c Streamer) WaitStreaming() error
- type Streamer_List
- type Streamer_Server
- type Streamer_recv
- type Streamer_recv_Params
- func (Streamer_recv_Params) DecodeFromPtr(p capnp.Ptr) Streamer_recv_Params
- func (s Streamer_recv_Params) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr
- func (s Streamer_recv_Params) IsValid() bool
- func (s Streamer_recv_Params) Message() *capnp.Message
- func (s Streamer_recv_Params) Segment() *capnp.Segment
- func (s Streamer_recv_Params) String() string
- func (s Streamer_recv_Params) ToPtr() capnp.Ptr
- type Streamer_recv_Params_Future
- type Streamer_recv_Params_List
Constants ¶
const Echoer_TypeID = 0xef96789c0d60cd00
Echoer_TypeID is the unique identifier for the type Echoer.
const Echoer_echo_Params_TypeID = 0x97878b56a59dadff
Echoer_echo_Params_TypeID is the unique identifier for the type Echoer_echo_Params.
const Echoer_echo_Results_TypeID = 0xa46d5fd1187fd6ee
Echoer_echo_Results_TypeID is the unique identifier for the type Echoer_echo_Results.
const Streamer_TypeID = 0x87f59ceaa25ddecc
Streamer_TypeID is the unique identifier for the type Streamer.
const Streamer_recv_Params_TypeID = 0xf01f1821166adede
Streamer_recv_Params_TypeID is the unique identifier for the type Streamer_recv_Params.
Variables ¶
This section is empty.
Functions ¶
func Echoer_Methods ¶
func Echoer_Methods(methods []server.Method, s Echoer_Server) []server.Method
Echoer_Methods appends Methods to a slice that invoke the methods on s. This can be used to create a more complicated Server.
func Echoer_NewServer ¶
func Echoer_NewServer(s Echoer_Server) *server.Server
Echoer_NewServer creates a new Server from an implementation of Echoer_Server.
func RegisterSchema ¶
func Streamer_Methods ¶
func Streamer_Methods(methods []server.Method, s Streamer_Server) []server.Method
Streamer_Methods appends Methods to a slice that invoke the methods on s. This can be used to create a more complicated Server.
func Streamer_NewServer ¶
func Streamer_NewServer(s Streamer_Server) *server.Server
Streamer_NewServer creates a new Server from an implementation of Streamer_Server.
Types ¶
type Echoer ¶
func Echoer_ServerToClient ¶
func Echoer_ServerToClient(s Echoer_Server) Echoer
Echoer_ServerToClient creates a new Client from an implementation of Echoer_Server. The caller is responsible for calling Release on the returned Client.
func (Echoer) AddRef ¶
AddRef creates a new Client that refers to the same capability as c. If c is nil or has resolved to null, then AddRef returns nil.
func (Echoer) Echo ¶
func (c Echoer) Echo(ctx context.Context, params func(Echoer_echo_Params) error) (Echoer_echo_Results_Future, capnp.ReleaseFunc)
func (Echoer) GetFlowLimiter ¶
func (c Echoer) GetFlowLimiter() fc.FlowLimiter
Get the current flowcontrol.FlowLimiter used to manage flow control for this client.
func (Echoer) IsSame ¶
IsSame reports whether c and other refer to a capability created by the same call to NewClient. This can return false negatives if c or other are not fully resolved: use Resolve if this is an issue. If either c or other are released, then IsSame panics.
func (Echoer) IsValid ¶
IsValid reports whether c is a valid reference to a capability. A reference is invalid if it is nil, has resolved to null, or has been released.
func (Echoer) Release ¶
func (c Echoer) Release()
Release releases a capability reference. If this is the last reference to the capability, then the underlying resources associated with the capability will be released.
Release will panic if c has already been released, but not if c is nil or resolved to null.
func (Echoer) Resolve ¶
Resolve blocks until the capability is fully resolved or the Context expires.
func (Echoer) SetFlowLimiter ¶
func (c Echoer) SetFlowLimiter(lim fc.FlowLimiter)
Update the flowcontrol.FlowLimiter used to manage flow control for this client. This affects all future calls, but not calls already waiting to send. Passing nil sets the value to flowcontrol.NopLimiter, which is also the default.
func (Echoer) String ¶
String returns a string that identifies this capability for debugging purposes. Its format should not be depended on: in particular, it should not be used to compare clients. Use IsSame to compare clients for equality.
func (Echoer) WaitStreaming ¶
type Echoer_List ¶
Echoer_List is a list of Echoer.
func NewEchoer_List ¶
func NewEchoer_List(s *capnp.Segment, sz int32) (Echoer_List, error)
NewEchoer creates a new list of Echoer.
type Echoer_Server ¶
type Echoer_Server interface {
Echo(context.Context, Echoer_echo) error
}
A Echoer_Server is a Echoer with a local implementation.
type Echoer_echo ¶
Echoer_echo holds the state for a server call to Echoer.echo. See server.Call for documentation.
func (Echoer_echo) AllocResults ¶
func (c Echoer_echo) AllocResults() (Echoer_echo_Results, error)
AllocResults allocates the results struct.
func (Echoer_echo) Args ¶
func (c Echoer_echo) Args() Echoer_echo_Params
Args returns the call's arguments.
type Echoer_echo_Params ¶
func NewEchoer_echo_Params ¶
func NewEchoer_echo_Params(s *capnp.Segment) (Echoer_echo_Params, error)
func NewRootEchoer_echo_Params ¶
func NewRootEchoer_echo_Params(s *capnp.Segment) (Echoer_echo_Params, error)
func ReadRootEchoer_echo_Params ¶
func ReadRootEchoer_echo_Params(msg *capnp.Message) (Echoer_echo_Params, error)
func (Echoer_echo_Params) DecodeFromPtr ¶
func (Echoer_echo_Params) DecodeFromPtr(p capnp.Ptr) Echoer_echo_Params
func (Echoer_echo_Params) EncodeAsPtr ¶
func (s Echoer_echo_Params) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr
func (Echoer_echo_Params) HasPayload ¶
func (s Echoer_echo_Params) HasPayload() bool
func (Echoer_echo_Params) IsValid ¶
func (s Echoer_echo_Params) IsValid() bool
func (Echoer_echo_Params) Message ¶
func (s Echoer_echo_Params) Message() *capnp.Message
func (Echoer_echo_Params) Payload ¶
func (s Echoer_echo_Params) Payload() (string, error)
func (Echoer_echo_Params) PayloadBytes ¶
func (s Echoer_echo_Params) PayloadBytes() ([]byte, error)
func (Echoer_echo_Params) Segment ¶
func (s Echoer_echo_Params) Segment() *capnp.Segment
func (Echoer_echo_Params) SetPayload ¶
func (s Echoer_echo_Params) SetPayload(v string) error
func (Echoer_echo_Params) String ¶
func (s Echoer_echo_Params) String() string
func (Echoer_echo_Params) ToPtr ¶
func (s Echoer_echo_Params) ToPtr() capnp.Ptr
type Echoer_echo_Params_Future ¶
Echoer_echo_Params_Future is a wrapper for a Echoer_echo_Params promised by a client call.
func (Echoer_echo_Params_Future) Struct ¶
func (f Echoer_echo_Params_Future) Struct() (Echoer_echo_Params, error)
type Echoer_echo_Params_List ¶
type Echoer_echo_Params_List = capnp.StructList[Echoer_echo_Params]
Echoer_echo_Params_List is a list of Echoer_echo_Params.
func NewEchoer_echo_Params_List ¶
func NewEchoer_echo_Params_List(s *capnp.Segment, sz int32) (Echoer_echo_Params_List, error)
NewEchoer_echo_Params creates a new list of Echoer_echo_Params.
type Echoer_echo_Results ¶
func NewEchoer_echo_Results ¶
func NewEchoer_echo_Results(s *capnp.Segment) (Echoer_echo_Results, error)
func NewRootEchoer_echo_Results ¶
func NewRootEchoer_echo_Results(s *capnp.Segment) (Echoer_echo_Results, error)
func ReadRootEchoer_echo_Results ¶
func ReadRootEchoer_echo_Results(msg *capnp.Message) (Echoer_echo_Results, error)
func (Echoer_echo_Results) DecodeFromPtr ¶
func (Echoer_echo_Results) DecodeFromPtr(p capnp.Ptr) Echoer_echo_Results
func (Echoer_echo_Results) EncodeAsPtr ¶
func (s Echoer_echo_Results) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr
func (Echoer_echo_Results) HasResult ¶
func (s Echoer_echo_Results) HasResult() bool
func (Echoer_echo_Results) IsValid ¶
func (s Echoer_echo_Results) IsValid() bool
func (Echoer_echo_Results) Message ¶
func (s Echoer_echo_Results) Message() *capnp.Message
func (Echoer_echo_Results) Result ¶
func (s Echoer_echo_Results) Result() (string, error)
func (Echoer_echo_Results) ResultBytes ¶
func (s Echoer_echo_Results) ResultBytes() ([]byte, error)
func (Echoer_echo_Results) Segment ¶
func (s Echoer_echo_Results) Segment() *capnp.Segment
func (Echoer_echo_Results) SetResult ¶
func (s Echoer_echo_Results) SetResult(v string) error
func (Echoer_echo_Results) String ¶
func (s Echoer_echo_Results) String() string
func (Echoer_echo_Results) ToPtr ¶
func (s Echoer_echo_Results) ToPtr() capnp.Ptr
type Echoer_echo_Results_Future ¶
Echoer_echo_Results_Future is a wrapper for a Echoer_echo_Results promised by a client call.
func (Echoer_echo_Results_Future) Struct ¶
func (f Echoer_echo_Results_Future) Struct() (Echoer_echo_Results, error)
type Echoer_echo_Results_List ¶
type Echoer_echo_Results_List = capnp.StructList[Echoer_echo_Results]
Echoer_echo_Results_List is a list of Echoer_echo_Results.
func NewEchoer_echo_Results_List ¶
func NewEchoer_echo_Results_List(s *capnp.Segment, sz int32) (Echoer_echo_Results_List, error)
NewEchoer_echo_Results creates a new list of Echoer_echo_Results.
type Streamer ¶
func Streamer_ServerToClient ¶
func Streamer_ServerToClient(s Streamer_Server) Streamer
Streamer_ServerToClient creates a new Client from an implementation of Streamer_Server. The caller is responsible for calling Release on the returned Client.
func (Streamer) AddRef ¶
AddRef creates a new Client that refers to the same capability as c. If c is nil or has resolved to null, then AddRef returns nil.
func (Streamer) GetFlowLimiter ¶
func (c Streamer) GetFlowLimiter() fc.FlowLimiter
Get the current flowcontrol.FlowLimiter used to manage flow control for this client.
func (Streamer) IsSame ¶
IsSame reports whether c and other refer to a capability created by the same call to NewClient. This can return false negatives if c or other are not fully resolved: use Resolve if this is an issue. If either c or other are released, then IsSame panics.
func (Streamer) IsValid ¶
IsValid reports whether c is a valid reference to a capability. A reference is invalid if it is nil, has resolved to null, or has been released.
func (Streamer) Release ¶
func (c Streamer) Release()
Release releases a capability reference. If this is the last reference to the capability, then the underlying resources associated with the capability will be released.
Release will panic if c has already been released, but not if c is nil or resolved to null.
func (Streamer) Resolve ¶
Resolve blocks until the capability is fully resolved or the Context expires.
func (Streamer) SetFlowLimiter ¶
func (c Streamer) SetFlowLimiter(lim fc.FlowLimiter)
Update the flowcontrol.FlowLimiter used to manage flow control for this client. This affects all future calls, but not calls already waiting to send. Passing nil sets the value to flowcontrol.NopLimiter, which is also the default.
func (Streamer) String ¶
String returns a string that identifies this capability for debugging purposes. Its format should not be depended on: in particular, it should not be used to compare clients. Use IsSame to compare clients for equality.
func (Streamer) WaitStreaming ¶
type Streamer_List ¶
Streamer_List is a list of Streamer.
func NewStreamer_List ¶
func NewStreamer_List(s *capnp.Segment, sz int32) (Streamer_List, error)
NewStreamer creates a new list of Streamer.
type Streamer_Server ¶
type Streamer_Server interface {
Recv(context.Context, Streamer_recv) error
}
A Streamer_Server is a Streamer with a local implementation.
type Streamer_recv ¶
Streamer_recv holds the state for a server call to Streamer.recv. See server.Call for documentation.
func (Streamer_recv) AllocResults ¶
func (c Streamer_recv) AllocResults() (stream.StreamResult, error)
AllocResults allocates the results struct.
func (Streamer_recv) Args ¶
func (c Streamer_recv) Args() Streamer_recv_Params
Args returns the call's arguments.
type Streamer_recv_Params ¶
func NewRootStreamer_recv_Params ¶
func NewRootStreamer_recv_Params(s *capnp.Segment) (Streamer_recv_Params, error)
func NewStreamer_recv_Params ¶
func NewStreamer_recv_Params(s *capnp.Segment) (Streamer_recv_Params, error)
func ReadRootStreamer_recv_Params ¶
func ReadRootStreamer_recv_Params(msg *capnp.Message) (Streamer_recv_Params, error)
func (Streamer_recv_Params) DecodeFromPtr ¶
func (Streamer_recv_Params) DecodeFromPtr(p capnp.Ptr) Streamer_recv_Params
func (Streamer_recv_Params) EncodeAsPtr ¶
func (s Streamer_recv_Params) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr
func (Streamer_recv_Params) IsValid ¶
func (s Streamer_recv_Params) IsValid() bool
func (Streamer_recv_Params) Message ¶
func (s Streamer_recv_Params) Message() *capnp.Message
func (Streamer_recv_Params) Segment ¶
func (s Streamer_recv_Params) Segment() *capnp.Segment
func (Streamer_recv_Params) String ¶
func (s Streamer_recv_Params) String() string
func (Streamer_recv_Params) ToPtr ¶
func (s Streamer_recv_Params) ToPtr() capnp.Ptr
type Streamer_recv_Params_Future ¶
Streamer_recv_Params_Future is a wrapper for a Streamer_recv_Params promised by a client call.
func (Streamer_recv_Params_Future) Struct ¶
func (f Streamer_recv_Params_Future) Struct() (Streamer_recv_Params, error)
type Streamer_recv_Params_List ¶
type Streamer_recv_Params_List = capnp.StructList[Streamer_recv_Params]
Streamer_recv_Params_List is a list of Streamer_recv_Params.
func NewStreamer_recv_Params_List ¶
func NewStreamer_recv_Params_List(s *capnp.Segment, sz int32) (Streamer_recv_Params_List, error)
NewStreamer_recv_Params creates a new list of Streamer_recv_Params.