test

package module
v0.0.0-...-7d73fae Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MPL-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const A_TypeID = 0xba9eff6fb3abc84f

A_TypeID is the unique identifier for the type A.

View Source
const A_method_Params_TypeID = 0xc506e9c0e16825f7

A_method_Params_TypeID is the unique identifier for the type A_method_Params.

View Source
const A_method_Results_TypeID = 0x9e2108f9306a75ef

A_method_Results_TypeID is the unique identifier for the type A_method_Results.

Variables

This section is empty.

Functions

func A_Methods

func A_Methods(methods []server.Method, s A_Server) []server.Method

A_Methods appends Methods to a slice that invoke the methods on s. This can be used to create a more complicated Server.

func A_NewServer

func A_NewServer(s A_Server) *server.Server

A_NewServer creates a new Server from an implementation of A_Server.

func RegisterSchema

func RegisterSchema(reg *schemas.Registry)

Types

type A

type A capnp.Client

func A_ServerToClient

func A_ServerToClient(s A_Server) A

A_ServerToClient creates a new Client from an implementation of A_Server. The caller is responsible for calling Release on the returned Client.

func (A) AddRef

func (c A) AddRef() A

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

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

func (A) EncodeAsPtr

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

func (A) GetFlowLimiter

func (c A) GetFlowLimiter() fc.FlowLimiter

Get the current flowcontrol.FlowLimiter used to manage flow control for this client.

func (A) IsSame

func (c A) IsSame(other A) 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 (A) IsValid

func (c A) 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 (A) Method

func (A) Release

func (c A) 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 (A) Resolve

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

Resolve blocks until the capability is fully resolved or the Context expires.

func (A) SetFlowLimiter

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

func (c A) 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 (A) WaitStreaming

func (c A) WaitStreaming() error

type A_List

type A_List = capnp.CapList[A]

A_List is a list of A.

func NewA_List

func NewA_List(s *capnp.Segment, sz int32) (A_List, error)

NewA creates a new list of A.

type A_Server

type A_Server interface {
	Method(context.Context, A_method) error
}

A A_Server is a A with a local implementation.

type A_method

type A_method struct {
	*server.Call
}

A_method holds the state for a server call to A.method. See server.Call for documentation.

func (A_method) AllocResults

func (c A_method) AllocResults() (A_method_Results, error)

AllocResults allocates the results struct.

func (A_method) Args

func (c A_method) Args() A_method_Params

Args returns the call's arguments.

type A_method_Params

type A_method_Params capnp.Struct

func NewA_method_Params

func NewA_method_Params(s *capnp.Segment) (A_method_Params, error)

func NewRootA_method_Params

func NewRootA_method_Params(s *capnp.Segment) (A_method_Params, error)

func ReadRootA_method_Params

func ReadRootA_method_Params(msg *capnp.Message) (A_method_Params, error)

func (A_method_Params) DecodeFromPtr

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

func (A_method_Params) EncodeAsPtr

func (s A_method_Params) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (A_method_Params) HasParam

func (s A_method_Params) HasParam() bool

func (A_method_Params) IsValid

func (s A_method_Params) IsValid() bool

func (A_method_Params) Message

func (s A_method_Params) Message() *capnp.Message

func (A_method_Params) Param

func (s A_method_Params) Param() (string, error)

func (A_method_Params) ParamBytes

func (s A_method_Params) ParamBytes() ([]byte, error)

func (A_method_Params) Segment

func (s A_method_Params) Segment() *capnp.Segment

func (A_method_Params) SetParam

func (s A_method_Params) SetParam(v string) error

func (A_method_Params) String

func (s A_method_Params) String() string

func (A_method_Params) ToPtr

func (s A_method_Params) ToPtr() capnp.Ptr

type A_method_Params_Future

type A_method_Params_Future struct{ *capnp.Future }

A_method_Params_Future is a wrapper for a A_method_Params promised by a client call.

func (A_method_Params_Future) Struct

type A_method_Params_List

type A_method_Params_List = capnp.StructList[A_method_Params]

A_method_Params_List is a list of A_method_Params.

func NewA_method_Params_List

func NewA_method_Params_List(s *capnp.Segment, sz int32) (A_method_Params_List, error)

NewA_method_Params creates a new list of A_method_Params.

type A_method_Results

type A_method_Results capnp.Struct

func NewA_method_Results

func NewA_method_Results(s *capnp.Segment) (A_method_Results, error)

func NewRootA_method_Results

func NewRootA_method_Results(s *capnp.Segment) (A_method_Results, error)

func ReadRootA_method_Results

func ReadRootA_method_Results(msg *capnp.Message) (A_method_Results, error)

func (A_method_Results) DecodeFromPtr

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

func (A_method_Results) EncodeAsPtr

func (s A_method_Results) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (A_method_Results) HasRes

func (s A_method_Results) HasRes() bool

func (A_method_Results) IsValid

func (s A_method_Results) IsValid() bool

func (A_method_Results) Message

func (s A_method_Results) Message() *capnp.Message

func (A_method_Results) Res

func (s A_method_Results) Res() (string, error)

func (A_method_Results) ResBytes

func (s A_method_Results) ResBytes() ([]byte, error)

func (A_method_Results) Segment

func (s A_method_Results) Segment() *capnp.Segment

func (A_method_Results) SetRes

func (s A_method_Results) SetRes(v string) error

func (A_method_Results) String

func (s A_method_Results) String() string

func (A_method_Results) ToPtr

func (s A_method_Results) ToPtr() capnp.Ptr

type A_method_Results_Future

type A_method_Results_Future struct{ *capnp.Future }

A_method_Results_Future is a wrapper for a A_method_Results promised by a client call.

func (A_method_Results_Future) Struct

type A_method_Results_List

type A_method_Results_List = capnp.StructList[A_method_Results]

A_method_Results_List is a list of A_method_Results.

func NewA_method_Results_List

func NewA_method_Results_List(s *capnp.Segment, sz int32) (A_method_Results_List, error)

NewA_method_Results creates a new list of A_method_Results.

Jump to

Keyboard shortcuts

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