persistent

package
v3.0.0-alpha-29 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 6 Imported by: 7

Documentation

Index

Constants

View Source
const PersistentAnnotation = uint64(0xf622595091cafb67)
View Source
const Persistent_SaveParams_TypeID = 0xf76fba59183073a5

Persistent_SaveParams_TypeID is the unique identifier for the type Persistent_SaveParams.

View Source
const Persistent_SaveResults_TypeID = 0xb76848c18c40efbf

Persistent_SaveResults_TypeID is the unique identifier for the type Persistent_SaveResults.

View Source
const Persistent_TypeID = 0xc8cb212fcd9f5691

Persistent_TypeID is the unique identifier for the type Persistent.

Variables

This section is empty.

Functions

func Persistent_Methods

func Persistent_Methods(methods []server.Method, s Persistent_Server) []server.Method

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

func Persistent_NewServer

func Persistent_NewServer(s Persistent_Server) *server.Server

Persistent_NewServer creates a new Server from an implementation of Persistent_Server.

func RegisterSchema

func RegisterSchema(reg *schemas.Registry)

Types

type Persistent

type Persistent capnp.Client

func Persistent_ServerToClient

func Persistent_ServerToClient(s Persistent_Server) Persistent

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

func (Persistent) AddRef

func (c Persistent) AddRef() Persistent

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

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

func (Persistent) EncodeAsPtr

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

func (Persistent) GetFlowLimiter

func (c Persistent) GetFlowLimiter() fc.FlowLimiter

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

func (Persistent) IsSame

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

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

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

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

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

func (Persistent) SetFlowLimiter

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

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

func (c Persistent) WaitStreaming() error

type Persistent_List

type Persistent_List = capnp.CapList[Persistent]

Persistent_List is a list of Persistent.

func NewPersistent_List

func NewPersistent_List(s *capnp.Segment, sz int32) (Persistent_List, error)

NewPersistent creates a new list of Persistent.

type Persistent_SaveParams

type Persistent_SaveParams capnp.Struct

func NewPersistent_SaveParams

func NewPersistent_SaveParams(s *capnp.Segment) (Persistent_SaveParams, error)

func NewRootPersistent_SaveParams

func NewRootPersistent_SaveParams(s *capnp.Segment) (Persistent_SaveParams, error)

func ReadRootPersistent_SaveParams

func ReadRootPersistent_SaveParams(msg *capnp.Message) (Persistent_SaveParams, error)

func (Persistent_SaveParams) DecodeFromPtr

func (Persistent_SaveParams) EncodeAsPtr

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

func (Persistent_SaveParams) HasSealFor

func (s Persistent_SaveParams) HasSealFor() bool

func (Persistent_SaveParams) IsValid

func (s Persistent_SaveParams) IsValid() bool

func (Persistent_SaveParams) Message

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

func (Persistent_SaveParams) SealFor

func (s Persistent_SaveParams) SealFor() (capnp.Ptr, error)

func (Persistent_SaveParams) Segment

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

func (Persistent_SaveParams) SetSealFor

func (s Persistent_SaveParams) SetSealFor(v capnp.Ptr) error

func (Persistent_SaveParams) String

func (s Persistent_SaveParams) String() string

func (Persistent_SaveParams) ToPtr

func (s Persistent_SaveParams) ToPtr() capnp.Ptr

type Persistent_SaveParams_Future

type Persistent_SaveParams_Future struct{ *capnp.Future }

Persistent_SaveParams_Future is a wrapper for a Persistent_SaveParams promised by a client call.

func (Persistent_SaveParams_Future) SealFor

func (Persistent_SaveParams_Future) Struct

type Persistent_SaveParams_List

type Persistent_SaveParams_List = capnp.StructList[Persistent_SaveParams]

Persistent_SaveParams_List is a list of Persistent_SaveParams.

func NewPersistent_SaveParams_List

func NewPersistent_SaveParams_List(s *capnp.Segment, sz int32) (Persistent_SaveParams_List, error)

NewPersistent_SaveParams creates a new list of Persistent_SaveParams.

type Persistent_SaveResults

type Persistent_SaveResults capnp.Struct

func NewPersistent_SaveResults

func NewPersistent_SaveResults(s *capnp.Segment) (Persistent_SaveResults, error)

func NewRootPersistent_SaveResults

func NewRootPersistent_SaveResults(s *capnp.Segment) (Persistent_SaveResults, error)

func ReadRootPersistent_SaveResults

func ReadRootPersistent_SaveResults(msg *capnp.Message) (Persistent_SaveResults, error)

func (Persistent_SaveResults) DecodeFromPtr

func (Persistent_SaveResults) EncodeAsPtr

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

func (Persistent_SaveResults) HasSturdyRef

func (s Persistent_SaveResults) HasSturdyRef() bool

func (Persistent_SaveResults) IsValid

func (s Persistent_SaveResults) IsValid() bool

func (Persistent_SaveResults) Message

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

func (Persistent_SaveResults) Segment

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

func (Persistent_SaveResults) SetSturdyRef

func (s Persistent_SaveResults) SetSturdyRef(v capnp.Ptr) error

func (Persistent_SaveResults) String

func (s Persistent_SaveResults) String() string

func (Persistent_SaveResults) SturdyRef

func (s Persistent_SaveResults) SturdyRef() (capnp.Ptr, error)

func (Persistent_SaveResults) ToPtr

func (s Persistent_SaveResults) ToPtr() capnp.Ptr

type Persistent_SaveResults_Future

type Persistent_SaveResults_Future struct{ *capnp.Future }

Persistent_SaveResults_Future is a wrapper for a Persistent_SaveResults promised by a client call.

func (Persistent_SaveResults_Future) Struct

func (Persistent_SaveResults_Future) SturdyRef

type Persistent_SaveResults_List

type Persistent_SaveResults_List = capnp.StructList[Persistent_SaveResults]

Persistent_SaveResults_List is a list of Persistent_SaveResults.

func NewPersistent_SaveResults_List

func NewPersistent_SaveResults_List(s *capnp.Segment, sz int32) (Persistent_SaveResults_List, error)

NewPersistent_SaveResults creates a new list of Persistent_SaveResults.

type Persistent_Server

type Persistent_Server interface {
	Save(context.Context, Persistent_save) error
}

A Persistent_Server is a Persistent with a local implementation.

type Persistent_save

type Persistent_save struct {
	*server.Call
}

Persistent_save holds the state for a server call to Persistent.save. See server.Call for documentation.

func (Persistent_save) AllocResults

func (c Persistent_save) AllocResults() (Persistent_SaveResults, error)

AllocResults allocates the results struct.

func (Persistent_save) Args

Args returns the call's arguments.

Jump to

Keyboard shortcuts

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