registry

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Location_TypeID = 0xe61540af32cf81b6

Location_TypeID is the unique identifier for the type Location.

View Source
const Message_TypeID = 0xd2afeaf36c70c91f

Message_TypeID is the unique identifier for the type Message.

View Source
const Registry_TypeID = 0xfdee076f6379cb46

Registry_TypeID is the unique identifier for the type Registry.

View Source
const Registry_findProviders_Params_TypeID = 0xd589c56f3d6a445e

Registry_findProviders_Params_TypeID is the unique identifier for the type Registry_findProviders_Params.

View Source
const Registry_findProviders_Results_TypeID = 0xd86baa632daef690

Registry_findProviders_Results_TypeID is the unique identifier for the type Registry_findProviders_Results.

View Source
const Registry_provide_Params_TypeID = 0xbf9edfd4684337f6

Registry_provide_Params_TypeID is the unique identifier for the type Registry_provide_Params.

View Source
const Registry_provide_Results_TypeID = 0xd9ef66060e1157d3

Registry_provide_Results_TypeID is the unique identifier for the type Registry_provide_Results.

Variables

This section is empty.

Functions

func RegisterSchema

func RegisterSchema(reg *schemas.Registry)

func Registry_Methods

func Registry_Methods(methods []server.Method, s Registry_Server) []server.Method

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

func Registry_NewServer

func Registry_NewServer(s Registry_Server) *server.Server

Registry_NewServer creates a new Server from an implementation of Registry_Server.

Types

type Location

type Location capnp.Struct

func NewLocation

func NewLocation(s *capnp.Segment) (Location, error)

func NewRootLocation

func NewRootLocation(s *capnp.Segment) (Location, error)

func ReadRootLocation

func ReadRootLocation(msg *capnp.Message) (Location, error)

func (Location) Anchor

func (s Location) Anchor() (string, error)

func (Location) AnchorBytes

func (s Location) AnchorBytes() ([]byte, error)

func (Location) Custom

func (s Location) Custom() (capnp.Ptr, error)

func (Location) DecodeFromPtr

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

func (Location) EncodeAsPtr

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

func (Location) HasAnchor

func (s Location) HasAnchor() bool

func (Location) HasCustom

func (s Location) HasCustom() bool

func (Location) HasMaddrs

func (s Location) HasMaddrs() bool

func (Location) HasMeta

func (s Location) HasMeta() bool

func (Location) HasService

func (s Location) HasService() bool

func (Location) IsValid

func (s Location) IsValid() bool

func (Location) Maddrs

func (s Location) Maddrs() (capnp.DataList, error)

func (Location) Message

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

func (Location) Meta

func (s Location) Meta() (capnp.TextList, error)

func (Location) NewMaddrs

func (s Location) NewMaddrs(n int32) (capnp.DataList, error)

NewMaddrs sets the maddrs field to a newly allocated capnp.DataList, preferring placement in s's segment.

func (Location) NewMeta

func (s Location) NewMeta(n int32) (capnp.TextList, error)

NewMeta sets the meta field to a newly allocated capnp.TextList, preferring placement in s's segment.

func (Location) Segment

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

func (Location) Service

func (s Location) Service() (string, error)

func (Location) ServiceBytes

func (s Location) ServiceBytes() ([]byte, error)

func (Location) SetAnchor

func (s Location) SetAnchor(v string) error

func (Location) SetCustom

func (s Location) SetCustom(v capnp.Ptr) error

func (Location) SetMaddrs

func (s Location) SetMaddrs(v capnp.DataList) error

func (Location) SetMeta

func (s Location) SetMeta(v capnp.TextList) error

func (Location) SetService

func (s Location) SetService(v string) error

func (Location) String

func (s Location) String() string

func (Location) ToPtr

func (s Location) ToPtr() capnp.Ptr

func (Location) Which

func (s Location) Which() Location_Which

type Location_Future

type Location_Future struct{ *capnp.Future }

Location_Future is a wrapper for a Location promised by a client call.

func (Location_Future) Custom

func (p Location_Future) Custom() *capnp.Future

func (Location_Future) Struct

func (f Location_Future) Struct() (Location, error)

type Location_List

type Location_List = capnp.StructList[Location]

Location_List is a list of Location.

func NewLocation_List

func NewLocation_List(s *capnp.Segment, sz int32) (Location_List, error)

NewLocation creates a new list of Location.

type Location_Which

type Location_Which uint16
const (
	Location_Which_maddrs Location_Which = 0
	Location_Which_anchor Location_Which = 1
	Location_Which_custom Location_Which = 2
)

func (Location_Which) String

func (w Location_Which) String() string

type Message

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

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

func (Message) EncodeAsPtr

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

func (Message) HasResponse

func (s Message) HasResponse() bool

func (Message) IsValid

func (s Message) IsValid() bool

func (Message) Message

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

func (Message) Response

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

func (Message) Segment

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

func (Message) SetRequest

func (s Message) SetRequest()

func (Message) SetResponse

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

func (Message) String

func (s Message) String() string

func (Message) ToPtr

func (s Message) ToPtr() capnp.Ptr

func (Message) Which

func (s Message) Which() Message_Which

type Message_Future

type Message_Future struct{ *capnp.Future }

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

func (Message_Future) Struct

func (f Message_Future) Struct() (Message, error)

type Message_List

type Message_List = capnp.StructList[Message]

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.

type Message_Which

type Message_Which uint16
const (
	Message_Which_request  Message_Which = 0
	Message_Which_response Message_Which = 1
)

func (Message_Which) String

func (w Message_Which) String() string

type Registry

type Registry capnp.Client

func Registry_ServerToClient

func Registry_ServerToClient(s Registry_Server) Registry

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

func (Registry) AddRef

func (c Registry) AddRef() Registry

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

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

func (Registry) EncodeAsPtr

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

func (Registry) GetFlowLimiter

func (c Registry) GetFlowLimiter() fc.FlowLimiter

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

func (Registry) IsSame

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

func (c Registry) 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 (Registry) Release

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

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

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

func (Registry) SetFlowLimiter

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

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

func (c Registry) WaitStreaming() error

type Registry_List

type Registry_List = capnp.CapList[Registry]

Registry_List is a list of Registry.

func NewRegistry_List

func NewRegistry_List(s *capnp.Segment, sz int32) (Registry_List, error)

NewRegistry creates a new list of Registry.

type Registry_Server

type Registry_Server interface {
	Provide(context.Context, Registry_provide) error

	FindProviders(context.Context, Registry_findProviders) error
}

A Registry_Server is a Registry with a local implementation.

type Registry_findProviders

type Registry_findProviders struct {
	*server.Call
}

Registry_findProviders holds the state for a server call to Registry.findProviders. See server.Call for documentation.

func (Registry_findProviders) AllocResults

AllocResults allocates the results struct.

func (Registry_findProviders) Args

Args returns the call's arguments.

type Registry_findProviders_Params

type Registry_findProviders_Params capnp.Struct

func NewRegistry_findProviders_Params

func NewRegistry_findProviders_Params(s *capnp.Segment) (Registry_findProviders_Params, error)

func NewRootRegistry_findProviders_Params

func NewRootRegistry_findProviders_Params(s *capnp.Segment) (Registry_findProviders_Params, error)

func ReadRootRegistry_findProviders_Params

func ReadRootRegistry_findProviders_Params(msg *capnp.Message) (Registry_findProviders_Params, error)

func (Registry_findProviders_Params) Chan

func (Registry_findProviders_Params) DecodeFromPtr

func (Registry_findProviders_Params) EncodeAsPtr

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

func (Registry_findProviders_Params) HasChan

func (s Registry_findProviders_Params) HasChan() bool

func (Registry_findProviders_Params) HasTopic

func (s Registry_findProviders_Params) HasTopic() bool

func (Registry_findProviders_Params) IsValid

func (s Registry_findProviders_Params) IsValid() bool

func (Registry_findProviders_Params) Message

func (Registry_findProviders_Params) Segment

func (Registry_findProviders_Params) SetChan

func (Registry_findProviders_Params) SetTopic

func (Registry_findProviders_Params) String

func (Registry_findProviders_Params) ToPtr

func (Registry_findProviders_Params) Topic

type Registry_findProviders_Params_Future

type Registry_findProviders_Params_Future struct{ *capnp.Future }

Registry_findProviders_Params_Future is a wrapper for a Registry_findProviders_Params promised by a client call.

func (Registry_findProviders_Params_Future) Chan

func (Registry_findProviders_Params_Future) Struct

func (Registry_findProviders_Params_Future) Topic

type Registry_findProviders_Params_List

type Registry_findProviders_Params_List = capnp.StructList[Registry_findProviders_Params]

Registry_findProviders_Params_List is a list of Registry_findProviders_Params.

func NewRegistry_findProviders_Params_List

func NewRegistry_findProviders_Params_List(s *capnp.Segment, sz int32) (Registry_findProviders_Params_List, error)

NewRegistry_findProviders_Params creates a new list of Registry_findProviders_Params.

type Registry_findProviders_Results

type Registry_findProviders_Results capnp.Struct

func NewRegistry_findProviders_Results

func NewRegistry_findProviders_Results(s *capnp.Segment) (Registry_findProviders_Results, error)

func NewRootRegistry_findProviders_Results

func NewRootRegistry_findProviders_Results(s *capnp.Segment) (Registry_findProviders_Results, error)

func ReadRootRegistry_findProviders_Results

func ReadRootRegistry_findProviders_Results(msg *capnp.Message) (Registry_findProviders_Results, error)

func (Registry_findProviders_Results) DecodeFromPtr

func (Registry_findProviders_Results) EncodeAsPtr

func (Registry_findProviders_Results) IsValid

func (Registry_findProviders_Results) Message

func (Registry_findProviders_Results) Segment

func (Registry_findProviders_Results) String

func (Registry_findProviders_Results) ToPtr

type Registry_findProviders_Results_Future

type Registry_findProviders_Results_Future struct{ *capnp.Future }

Registry_findProviders_Results_Future is a wrapper for a Registry_findProviders_Results promised by a client call.

func (Registry_findProviders_Results_Future) Struct

type Registry_findProviders_Results_List

type Registry_findProviders_Results_List = capnp.StructList[Registry_findProviders_Results]

Registry_findProviders_Results_List is a list of Registry_findProviders_Results.

func NewRegistry_findProviders_Results_List

func NewRegistry_findProviders_Results_List(s *capnp.Segment, sz int32) (Registry_findProviders_Results_List, error)

NewRegistry_findProviders_Results creates a new list of Registry_findProviders_Results.

type Registry_provide

type Registry_provide struct {
	*server.Call
}

Registry_provide holds the state for a server call to Registry.provide. See server.Call for documentation.

func (Registry_provide) AllocResults

func (c Registry_provide) AllocResults() (Registry_provide_Results, error)

AllocResults allocates the results struct.

func (Registry_provide) Args

Args returns the call's arguments.

type Registry_provide_Params

type Registry_provide_Params capnp.Struct

func NewRegistry_provide_Params

func NewRegistry_provide_Params(s *capnp.Segment) (Registry_provide_Params, error)

func NewRootRegistry_provide_Params

func NewRootRegistry_provide_Params(s *capnp.Segment) (Registry_provide_Params, error)

func ReadRootRegistry_provide_Params

func ReadRootRegistry_provide_Params(msg *capnp.Message) (Registry_provide_Params, error)

func (Registry_provide_Params) DecodeFromPtr

func (Registry_provide_Params) EncodeAsPtr

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

func (Registry_provide_Params) Envelope

func (s Registry_provide_Params) Envelope() ([]byte, error)

func (Registry_provide_Params) HasEnvelope

func (s Registry_provide_Params) HasEnvelope() bool

func (Registry_provide_Params) HasTopic

func (s Registry_provide_Params) HasTopic() bool

func (Registry_provide_Params) IsValid

func (s Registry_provide_Params) IsValid() bool

func (Registry_provide_Params) Message

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

func (Registry_provide_Params) Segment

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

func (Registry_provide_Params) SetEnvelope

func (s Registry_provide_Params) SetEnvelope(v []byte) error

func (Registry_provide_Params) SetTopic

func (s Registry_provide_Params) SetTopic(v pubsub.Topic) error

func (Registry_provide_Params) String

func (s Registry_provide_Params) String() string

func (Registry_provide_Params) ToPtr

func (s Registry_provide_Params) ToPtr() capnp.Ptr

func (Registry_provide_Params) Topic

type Registry_provide_Params_Future

type Registry_provide_Params_Future struct{ *capnp.Future }

Registry_provide_Params_Future is a wrapper for a Registry_provide_Params promised by a client call.

func (Registry_provide_Params_Future) Struct

func (Registry_provide_Params_Future) Topic

type Registry_provide_Params_List

type Registry_provide_Params_List = capnp.StructList[Registry_provide_Params]

Registry_provide_Params_List is a list of Registry_provide_Params.

func NewRegistry_provide_Params_List

func NewRegistry_provide_Params_List(s *capnp.Segment, sz int32) (Registry_provide_Params_List, error)

NewRegistry_provide_Params creates a new list of Registry_provide_Params.

type Registry_provide_Results

type Registry_provide_Results capnp.Struct

func NewRegistry_provide_Results

func NewRegistry_provide_Results(s *capnp.Segment) (Registry_provide_Results, error)

func NewRootRegistry_provide_Results

func NewRootRegistry_provide_Results(s *capnp.Segment) (Registry_provide_Results, error)

func ReadRootRegistry_provide_Results

func ReadRootRegistry_provide_Results(msg *capnp.Message) (Registry_provide_Results, error)

func (Registry_provide_Results) DecodeFromPtr

func (Registry_provide_Results) EncodeAsPtr

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

func (Registry_provide_Results) IsValid

func (s Registry_provide_Results) IsValid() bool

func (Registry_provide_Results) Message

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

func (Registry_provide_Results) Segment

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

func (Registry_provide_Results) String

func (s Registry_provide_Results) String() string

func (Registry_provide_Results) ToPtr

type Registry_provide_Results_Future

type Registry_provide_Results_Future struct{ *capnp.Future }

Registry_provide_Results_Future is a wrapper for a Registry_provide_Results promised by a client call.

func (Registry_provide_Results_Future) Struct

type Registry_provide_Results_List

type Registry_provide_Results_List = capnp.StructList[Registry_provide_Results]

Registry_provide_Results_List is a list of Registry_provide_Results.

func NewRegistry_provide_Results_List

func NewRegistry_provide_Results_List(s *capnp.Segment, sz int32) (Registry_provide_Results_List, error)

NewRegistry_provide_Results creates a new list of Registry_provide_Results.

Jump to

Keyboard shortcuts

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