testing

package
v0.0.0-...-055f8da Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Echoer_TypeID = 0xef96789c0d60cd00

Echoer_TypeID is the unique identifier for the type Echoer.

View Source
const Echoer_echo_Params_TypeID = 0x97878b56a59dadff

Echoer_echo_Params_TypeID is the unique identifier for the type Echoer_echo_Params.

View Source
const Echoer_echo_Results_TypeID = 0xa46d5fd1187fd6ee

Echoer_echo_Results_TypeID is the unique identifier for the type Echoer_echo_Results.

View Source
const Streamer_TypeID = 0x87f59ceaa25ddecc

Streamer_TypeID is the unique identifier for the type Streamer.

View Source
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 RegisterSchema(reg *schemas.Registry)

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

type Echoer capnp.Client

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

func (c Echoer) AddRef() Echoer

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) DecodeFromPtr

func (Echoer) DecodeFromPtr(p capnp.Ptr) Echoer

func (Echoer) Echo

func (Echoer) EncodeAsPtr

func (c Echoer) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

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

func (c Echoer) IsSame(other Echoer) bool

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

func (c Echoer) IsValid() bool

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

func (c Echoer) Resolve(ctx context.Context) error

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

func (c Echoer) String() 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

func (c Echoer) WaitStreaming() error

type Echoer_List

type Echoer_List = capnp.CapList[Echoer]

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

type Echoer_echo struct {
	*server.Call
}

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

Args returns the call's arguments.

type Echoer_echo_Params

type Echoer_echo_Params capnp.Struct

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) 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

type Echoer_echo_Params_Future struct{ *capnp.Future }

Echoer_echo_Params_Future is a wrapper for a Echoer_echo_Params promised by a client call.

func (Echoer_echo_Params_Future) Struct

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

type Echoer_echo_Results capnp.Struct

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) 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

type Echoer_echo_Results_Future struct{ *capnp.Future }

Echoer_echo_Results_Future is a wrapper for a Echoer_echo_Results promised by a client call.

func (Echoer_echo_Results_Future) Struct

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

type Streamer capnp.Client

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

func (c Streamer) AddRef() Streamer

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) DecodeFromPtr

func (Streamer) DecodeFromPtr(p capnp.Ptr) Streamer

func (Streamer) EncodeAsPtr

func (c Streamer) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

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

func (c Streamer) IsSame(other Streamer) bool

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

func (c Streamer) IsValid() bool

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) Recv

func (c Streamer) Recv(ctx context.Context, params func(Streamer_recv_Params) error) error

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

func (c Streamer) Resolve(ctx context.Context) error

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

func (c Streamer) String() 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

func (c Streamer) WaitStreaming() error

type Streamer_List

type Streamer_List = capnp.CapList[Streamer]

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

type Streamer_recv struct {
	*server.Call
}

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

Args returns the call's arguments.

type Streamer_recv_Params

type Streamer_recv_Params capnp.Struct

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) 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

type Streamer_recv_Params_Future struct{ *capnp.Future }

Streamer_recv_Params_Future is a wrapper for a Streamer_recv_Params promised by a client call.

func (Streamer_recv_Params_Future) Struct

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.

Jump to

Keyboard shortcuts

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