resource

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const SRPCResourceServiceServiceID = "resource.ResourceService"

Variables

View Source
var (
	// ErrResourceNotFound is returned when a requested resource does not exist.
	ErrResourceNotFound = errors.New("resource not found")
	// ErrClientReleased is returned when attempting to operate on a released client.
	ErrClientReleased = errors.New("client was released")
	// ErrInvalidResourceID is returned when a resource ID is invalid or out of bounds.
	ErrInvalidResourceID = errors.New("invalid resource id")
	// ErrInvalidClientID is returned when a client ID is invalid or out of bounds.
	ErrInvalidClientID = errors.New("invalid client id")
	// ErrInvalidComponentIDFormat is returned when a component ID is not in the expected format.
	ErrInvalidComponentIDFormat = errors.New("invalid component id format")
	// ErrResourceOrClientReleased is returned when either the resource or client has been released.
	ErrResourceOrClientReleased = errors.New("resource or client was released")
	// ErrNoResourceClientContext is returned if there was no ResourceClientContext.
	ErrNoResourceClientContext = errors.New("no resource client context")
)

Functions

func NewRoutedClient

func NewRoutedClient(inner srpc.Client, resourceID uint32) srpc.Client

NewRoutedClient wraps an SRPC client so all calls are prefixed with the resource ID for routing to the correct attached resource mux.

func NewSRPCResourceServiceHandler

func NewSRPCResourceServiceHandler(impl SRPCResourceServiceServer, serviceID string) srpc.Handler

NewSRPCResourceServiceHandler constructs a new RPC handler. serviceID: if empty, uses default: resource.ResourceService

func SRPCRegisterResourceService

func SRPCRegisterResourceService(mux srpc.Mux, impl SRPCResourceServiceServer) error

SRPCRegisterResourceService registers the implementation with the mux. Uses the default serviceID: resource.ResourceService

Types

type AttachMuxDataRwc

type AttachMuxDataRwc struct {
	// contains filtered or unexported fields
}

AttachMuxDataRwc bridges ResourceAttach mux_data packets to io.ReadWriteCloser. Used by both server and client sides of ResourceAttach to provide a ReadWriteCloser for yamux over the bidi stream.

func NewAttachMuxDataRwc

func NewAttachMuxDataRwc(
	sendMuxData func(data []byte) error,
	recvMuxData func() ([]byte, error),
) *AttachMuxDataRwc

NewAttachMuxDataRwc constructs a new AttachMuxDataRwc. sendMuxData sends raw bytes as a mux_data packet. recvMuxData blocks until the next mux_data packet arrives and returns its bytes.

func (*AttachMuxDataRwc) Close

func (a *AttachMuxDataRwc) Close() error

Close is a no-op; the stream lifecycle is managed by the caller.

func (*AttachMuxDataRwc) Read

func (a *AttachMuxDataRwc) Read(p []byte) (int, error)

Read reads from buffered mux_data, fetching more from recvMuxData as needed.

func (*AttachMuxDataRwc) Write

func (a *AttachMuxDataRwc) Write(p []byte) (int, error)

Write sends p as a mux_data packet. Clones the data since yamux may reuse buffers.

type ResourceAttachAck

type ResourceAttachAck struct {

	// Error is set if the session was rejected.
	Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

ResourceAttachAck is sent by the server to confirm the session.

func (*ResourceAttachAck) CloneMessageVT

func (m *ResourceAttachAck) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ResourceAttachAck) CloneVT

func (m *ResourceAttachAck) CloneVT() *ResourceAttachAck

func (*ResourceAttachAck) EqualMessageVT

func (this *ResourceAttachAck) EqualMessageVT(thatMsg any) bool

func (*ResourceAttachAck) EqualVT

func (this *ResourceAttachAck) EqualVT(that *ResourceAttachAck) bool

func (*ResourceAttachAck) GetError

func (x *ResourceAttachAck) GetError() string

func (*ResourceAttachAck) MarshalJSON

func (x *ResourceAttachAck) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceAttachAck to JSON.

func (*ResourceAttachAck) MarshalProtoJSON

func (x *ResourceAttachAck) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceAttachAck message to JSON.

func (*ResourceAttachAck) MarshalProtoText

func (x *ResourceAttachAck) MarshalProtoText() string

func (*ResourceAttachAck) MarshalToSizedBufferVT

func (m *ResourceAttachAck) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachAck) MarshalToVT

func (m *ResourceAttachAck) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachAck) MarshalVT

func (m *ResourceAttachAck) MarshalVT() (dAtA []byte, err error)

func (*ResourceAttachAck) ProtoMessage

func (*ResourceAttachAck) ProtoMessage()

func (*ResourceAttachAck) Reset

func (x *ResourceAttachAck) Reset()

func (*ResourceAttachAck) SizeVT

func (m *ResourceAttachAck) SizeVT() (n int)

func (*ResourceAttachAck) String

func (x *ResourceAttachAck) String() string

func (*ResourceAttachAck) UnmarshalJSON

func (x *ResourceAttachAck) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceAttachAck from JSON.

func (*ResourceAttachAck) UnmarshalProtoJSON

func (x *ResourceAttachAck) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceAttachAck message from JSON.

func (*ResourceAttachAck) UnmarshalVT

func (m *ResourceAttachAck) UnmarshalVT(dAtA []byte) error

type ResourceAttachAdd

type ResourceAttachAdd struct {

	// AttachId is a client-chosen correlation ID.
	AttachId uint32 `protobuf:"varint,1,opt,name=attach_id,json=attachId,proto3" json:"attachId,omitempty"`
	// Label is an informational description of the attached resource.
	Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
	// contains filtered or unexported fields
}

ResourceAttachAdd is sent by the client to register a resource.

func (*ResourceAttachAdd) CloneMessageVT

func (m *ResourceAttachAdd) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ResourceAttachAdd) CloneVT

func (m *ResourceAttachAdd) CloneVT() *ResourceAttachAdd

func (*ResourceAttachAdd) EqualMessageVT

func (this *ResourceAttachAdd) EqualMessageVT(thatMsg any) bool

func (*ResourceAttachAdd) EqualVT

func (this *ResourceAttachAdd) EqualVT(that *ResourceAttachAdd) bool

func (*ResourceAttachAdd) GetAttachId

func (x *ResourceAttachAdd) GetAttachId() uint32

func (*ResourceAttachAdd) GetLabel

func (x *ResourceAttachAdd) GetLabel() string

func (*ResourceAttachAdd) MarshalJSON

func (x *ResourceAttachAdd) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceAttachAdd to JSON.

func (*ResourceAttachAdd) MarshalProtoJSON

func (x *ResourceAttachAdd) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceAttachAdd message to JSON.

func (*ResourceAttachAdd) MarshalProtoText

func (x *ResourceAttachAdd) MarshalProtoText() string

func (*ResourceAttachAdd) MarshalToSizedBufferVT

func (m *ResourceAttachAdd) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachAdd) MarshalToVT

func (m *ResourceAttachAdd) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachAdd) MarshalVT

func (m *ResourceAttachAdd) MarshalVT() (dAtA []byte, err error)

func (*ResourceAttachAdd) ProtoMessage

func (*ResourceAttachAdd) ProtoMessage()

func (*ResourceAttachAdd) Reset

func (x *ResourceAttachAdd) Reset()

func (*ResourceAttachAdd) SizeVT

func (m *ResourceAttachAdd) SizeVT() (n int)

func (*ResourceAttachAdd) String

func (x *ResourceAttachAdd) String() string

func (*ResourceAttachAdd) UnmarshalJSON

func (x *ResourceAttachAdd) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceAttachAdd from JSON.

func (*ResourceAttachAdd) UnmarshalProtoJSON

func (x *ResourceAttachAdd) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceAttachAdd message from JSON.

func (*ResourceAttachAdd) UnmarshalVT

func (m *ResourceAttachAdd) UnmarshalVT(dAtA []byte) error

type ResourceAttachAddAck

type ResourceAttachAddAck struct {

	// AttachId echoes the client-chosen correlation ID.
	AttachId uint32 `protobuf:"varint,1,opt,name=attach_id,json=attachId,proto3" json:"attachId,omitempty"`
	// Error is set if the add was rejected.
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// ResourceId is the server-assigned ID for the attached resource.
	ResourceId uint32 `protobuf:"varint,3,opt,name=resource_id,json=resourceId,proto3" json:"resourceId,omitempty"`
	// contains filtered or unexported fields
}

ResourceAttachAddAck is sent by the server to confirm a resource was added.

func (*ResourceAttachAddAck) CloneMessageVT

func (*ResourceAttachAddAck) CloneVT

func (*ResourceAttachAddAck) EqualMessageVT

func (this *ResourceAttachAddAck) EqualMessageVT(thatMsg any) bool

func (*ResourceAttachAddAck) EqualVT

func (this *ResourceAttachAddAck) EqualVT(that *ResourceAttachAddAck) bool

func (*ResourceAttachAddAck) GetAttachId

func (x *ResourceAttachAddAck) GetAttachId() uint32

func (*ResourceAttachAddAck) GetError

func (x *ResourceAttachAddAck) GetError() string

func (*ResourceAttachAddAck) GetResourceId

func (x *ResourceAttachAddAck) GetResourceId() uint32

func (*ResourceAttachAddAck) MarshalJSON

func (x *ResourceAttachAddAck) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceAttachAddAck to JSON.

func (*ResourceAttachAddAck) MarshalProtoJSON

func (x *ResourceAttachAddAck) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceAttachAddAck message to JSON.

func (*ResourceAttachAddAck) MarshalProtoText

func (x *ResourceAttachAddAck) MarshalProtoText() string

func (*ResourceAttachAddAck) MarshalToSizedBufferVT

func (m *ResourceAttachAddAck) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachAddAck) MarshalToVT

func (m *ResourceAttachAddAck) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachAddAck) MarshalVT

func (m *ResourceAttachAddAck) MarshalVT() (dAtA []byte, err error)

func (*ResourceAttachAddAck) ProtoMessage

func (*ResourceAttachAddAck) ProtoMessage()

func (*ResourceAttachAddAck) Reset

func (x *ResourceAttachAddAck) Reset()

func (*ResourceAttachAddAck) SizeVT

func (m *ResourceAttachAddAck) SizeVT() (n int)

func (*ResourceAttachAddAck) String

func (x *ResourceAttachAddAck) String() string

func (*ResourceAttachAddAck) UnmarshalJSON

func (x *ResourceAttachAddAck) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceAttachAddAck from JSON.

func (*ResourceAttachAddAck) UnmarshalProtoJSON

func (x *ResourceAttachAddAck) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceAttachAddAck message from JSON.

func (*ResourceAttachAddAck) UnmarshalVT

func (m *ResourceAttachAddAck) UnmarshalVT(dAtA []byte) error

type ResourceAttachDetach

type ResourceAttachDetach struct {

	// ResourceId is the server-assigned ID to detach.
	ResourceId uint32 `protobuf:"varint,1,opt,name=resource_id,json=resourceId,proto3" json:"resourceId,omitempty"`
	// contains filtered or unexported fields
}

ResourceAttachDetach is sent by the client to withdraw a resource.

func (*ResourceAttachDetach) CloneMessageVT

func (*ResourceAttachDetach) CloneVT

func (*ResourceAttachDetach) EqualMessageVT

func (this *ResourceAttachDetach) EqualMessageVT(thatMsg any) bool

func (*ResourceAttachDetach) EqualVT

func (this *ResourceAttachDetach) EqualVT(that *ResourceAttachDetach) bool

func (*ResourceAttachDetach) GetResourceId

func (x *ResourceAttachDetach) GetResourceId() uint32

func (*ResourceAttachDetach) MarshalJSON

func (x *ResourceAttachDetach) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceAttachDetach to JSON.

func (*ResourceAttachDetach) MarshalProtoJSON

func (x *ResourceAttachDetach) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceAttachDetach message to JSON.

func (*ResourceAttachDetach) MarshalProtoText

func (x *ResourceAttachDetach) MarshalProtoText() string

func (*ResourceAttachDetach) MarshalToSizedBufferVT

func (m *ResourceAttachDetach) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachDetach) MarshalToVT

func (m *ResourceAttachDetach) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachDetach) MarshalVT

func (m *ResourceAttachDetach) MarshalVT() (dAtA []byte, err error)

func (*ResourceAttachDetach) ProtoMessage

func (*ResourceAttachDetach) ProtoMessage()

func (*ResourceAttachDetach) Reset

func (x *ResourceAttachDetach) Reset()

func (*ResourceAttachDetach) SizeVT

func (m *ResourceAttachDetach) SizeVT() (n int)

func (*ResourceAttachDetach) String

func (x *ResourceAttachDetach) String() string

func (*ResourceAttachDetach) UnmarshalJSON

func (x *ResourceAttachDetach) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceAttachDetach from JSON.

func (*ResourceAttachDetach) UnmarshalProtoJSON

func (x *ResourceAttachDetach) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceAttachDetach message from JSON.

func (*ResourceAttachDetach) UnmarshalVT

func (m *ResourceAttachDetach) UnmarshalVT(dAtA []byte) error

type ResourceAttachDetachAck

type ResourceAttachDetachAck struct {

	// ResourceId confirms which resource was detached.
	ResourceId uint32 `protobuf:"varint,1,opt,name=resource_id,json=resourceId,proto3" json:"resourceId,omitempty"`
	// contains filtered or unexported fields
}

ResourceAttachDetachAck is sent by the server to confirm a resource was detached.

func (*ResourceAttachDetachAck) CloneMessageVT

func (*ResourceAttachDetachAck) CloneVT

func (*ResourceAttachDetachAck) EqualMessageVT

func (this *ResourceAttachDetachAck) EqualMessageVT(thatMsg any) bool

func (*ResourceAttachDetachAck) EqualVT

func (*ResourceAttachDetachAck) GetResourceId

func (x *ResourceAttachDetachAck) GetResourceId() uint32

func (*ResourceAttachDetachAck) MarshalJSON

func (x *ResourceAttachDetachAck) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceAttachDetachAck to JSON.

func (*ResourceAttachDetachAck) MarshalProtoJSON

func (x *ResourceAttachDetachAck) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceAttachDetachAck message to JSON.

func (*ResourceAttachDetachAck) MarshalProtoText

func (x *ResourceAttachDetachAck) MarshalProtoText() string

func (*ResourceAttachDetachAck) MarshalToSizedBufferVT

func (m *ResourceAttachDetachAck) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachDetachAck) MarshalToVT

func (m *ResourceAttachDetachAck) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachDetachAck) MarshalVT

func (m *ResourceAttachDetachAck) MarshalVT() (dAtA []byte, err error)

func (*ResourceAttachDetachAck) ProtoMessage

func (*ResourceAttachDetachAck) ProtoMessage()

func (*ResourceAttachDetachAck) Reset

func (x *ResourceAttachDetachAck) Reset()

func (*ResourceAttachDetachAck) SizeVT

func (m *ResourceAttachDetachAck) SizeVT() (n int)

func (*ResourceAttachDetachAck) String

func (x *ResourceAttachDetachAck) String() string

func (*ResourceAttachDetachAck) UnmarshalJSON

func (x *ResourceAttachDetachAck) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceAttachDetachAck from JSON.

func (*ResourceAttachDetachAck) UnmarshalProtoJSON

func (x *ResourceAttachDetachAck) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceAttachDetachAck message from JSON.

func (*ResourceAttachDetachAck) UnmarshalVT

func (m *ResourceAttachDetachAck) UnmarshalVT(dAtA []byte) error

type ResourceAttachInit

type ResourceAttachInit struct {

	// ClientHandleId identifies the owning client session.
	ClientHandleId uint32 `protobuf:"varint,1,opt,name=client_handle_id,json=clientHandleId,proto3" json:"clientHandleId,omitempty"`
	// contains filtered or unexported fields
}

ResourceAttachInit is sent by the client to initiate a session.

func (*ResourceAttachInit) CloneMessageVT

func (m *ResourceAttachInit) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ResourceAttachInit) CloneVT

func (m *ResourceAttachInit) CloneVT() *ResourceAttachInit

func (*ResourceAttachInit) EqualMessageVT

func (this *ResourceAttachInit) EqualMessageVT(thatMsg any) bool

func (*ResourceAttachInit) EqualVT

func (this *ResourceAttachInit) EqualVT(that *ResourceAttachInit) bool

func (*ResourceAttachInit) GetClientHandleId

func (x *ResourceAttachInit) GetClientHandleId() uint32

func (*ResourceAttachInit) MarshalJSON

func (x *ResourceAttachInit) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceAttachInit to JSON.

func (*ResourceAttachInit) MarshalProtoJSON

func (x *ResourceAttachInit) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceAttachInit message to JSON.

func (*ResourceAttachInit) MarshalProtoText

func (x *ResourceAttachInit) MarshalProtoText() string

func (*ResourceAttachInit) MarshalToSizedBufferVT

func (m *ResourceAttachInit) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachInit) MarshalToVT

func (m *ResourceAttachInit) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachInit) MarshalVT

func (m *ResourceAttachInit) MarshalVT() (dAtA []byte, err error)

func (*ResourceAttachInit) ProtoMessage

func (*ResourceAttachInit) ProtoMessage()

func (*ResourceAttachInit) Reset

func (x *ResourceAttachInit) Reset()

func (*ResourceAttachInit) SizeVT

func (m *ResourceAttachInit) SizeVT() (n int)

func (*ResourceAttachInit) String

func (x *ResourceAttachInit) String() string

func (*ResourceAttachInit) UnmarshalJSON

func (x *ResourceAttachInit) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceAttachInit from JSON.

func (*ResourceAttachInit) UnmarshalProtoJSON

func (x *ResourceAttachInit) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceAttachInit message from JSON.

func (*ResourceAttachInit) UnmarshalVT

func (m *ResourceAttachInit) UnmarshalVT(dAtA []byte) error

type ResourceAttachRequest

type ResourceAttachRequest struct {

	// Body is the body of the request.
	//
	// Types that are assignable to Body:
	//
	//	*ResourceAttachRequest_Init
	//	*ResourceAttachRequest_Add
	//	*ResourceAttachRequest_Detach
	//	*ResourceAttachRequest_MuxData
	Body isResourceAttachRequest_Body `protobuf_oneof:"body"`
	// contains filtered or unexported fields
}

ResourceAttachRequest is a client-to-server message on the ResourceAttach stream.

func (*ResourceAttachRequest) CloneMessageVT

func (*ResourceAttachRequest) CloneVT

func (*ResourceAttachRequest) EqualMessageVT

func (this *ResourceAttachRequest) EqualMessageVT(thatMsg any) bool

func (*ResourceAttachRequest) EqualVT

func (this *ResourceAttachRequest) EqualVT(that *ResourceAttachRequest) bool

func (*ResourceAttachRequest) GetAdd

func (*ResourceAttachRequest) GetBody

func (m *ResourceAttachRequest) GetBody() isResourceAttachRequest_Body

func (*ResourceAttachRequest) GetDetach

func (*ResourceAttachRequest) GetInit

func (*ResourceAttachRequest) GetMuxData

func (x *ResourceAttachRequest) GetMuxData() []byte

func (*ResourceAttachRequest) MarshalJSON

func (x *ResourceAttachRequest) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceAttachRequest to JSON.

func (*ResourceAttachRequest) MarshalProtoJSON

func (x *ResourceAttachRequest) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceAttachRequest message to JSON.

func (*ResourceAttachRequest) MarshalProtoText

func (x *ResourceAttachRequest) MarshalProtoText() string

func (*ResourceAttachRequest) MarshalToSizedBufferVT

func (m *ResourceAttachRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachRequest) MarshalToVT

func (m *ResourceAttachRequest) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachRequest) MarshalVT

func (m *ResourceAttachRequest) MarshalVT() (dAtA []byte, err error)

func (*ResourceAttachRequest) ProtoMessage

func (*ResourceAttachRequest) ProtoMessage()

func (*ResourceAttachRequest) Reset

func (x *ResourceAttachRequest) Reset()

func (*ResourceAttachRequest) SizeVT

func (m *ResourceAttachRequest) SizeVT() (n int)

func (*ResourceAttachRequest) String

func (x *ResourceAttachRequest) String() string

func (*ResourceAttachRequest) UnmarshalJSON

func (x *ResourceAttachRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceAttachRequest from JSON.

func (*ResourceAttachRequest) UnmarshalProtoJSON

func (x *ResourceAttachRequest) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceAttachRequest message from JSON.

func (*ResourceAttachRequest) UnmarshalVT

func (m *ResourceAttachRequest) UnmarshalVT(dAtA []byte) error

type ResourceAttachRequest_Add

type ResourceAttachRequest_Add struct {
	// Add registers a new resource on the session.
	Add *ResourceAttachAdd `protobuf:"bytes,2,opt,name=add,proto3,oneof"`
}

func (*ResourceAttachRequest_Add) CloneOneofVT

func (m *ResourceAttachRequest_Add) CloneOneofVT() isResourceAttachRequest_Body

func (*ResourceAttachRequest_Add) CloneVT

func (*ResourceAttachRequest_Add) EqualVT

func (this *ResourceAttachRequest_Add) EqualVT(thatIface isResourceAttachRequest_Body) bool

func (*ResourceAttachRequest_Add) MarshalToSizedBufferVT

func (m *ResourceAttachRequest_Add) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachRequest_Add) MarshalToVT

func (m *ResourceAttachRequest_Add) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachRequest_Add) SizeVT

func (m *ResourceAttachRequest_Add) SizeVT() (n int)

type ResourceAttachRequest_Detach

type ResourceAttachRequest_Detach struct {
	// Detach withdraws a previously added resource.
	Detach *ResourceAttachDetach `protobuf:"bytes,3,opt,name=detach,proto3,oneof"`
}

func (*ResourceAttachRequest_Detach) CloneOneofVT

func (m *ResourceAttachRequest_Detach) CloneOneofVT() isResourceAttachRequest_Body

func (*ResourceAttachRequest_Detach) CloneVT

func (*ResourceAttachRequest_Detach) EqualVT

func (this *ResourceAttachRequest_Detach) EqualVT(thatIface isResourceAttachRequest_Body) bool

func (*ResourceAttachRequest_Detach) MarshalToSizedBufferVT

func (m *ResourceAttachRequest_Detach) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachRequest_Detach) MarshalToVT

func (m *ResourceAttachRequest_Detach) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachRequest_Detach) SizeVT

func (m *ResourceAttachRequest_Detach) SizeVT() (n int)

type ResourceAttachRequest_Init

type ResourceAttachRequest_Init struct {
	// Init is the session initialization message.
	Init *ResourceAttachInit `protobuf:"bytes,1,opt,name=init,proto3,oneof"`
}

func (*ResourceAttachRequest_Init) CloneOneofVT

func (m *ResourceAttachRequest_Init) CloneOneofVT() isResourceAttachRequest_Body

func (*ResourceAttachRequest_Init) CloneVT

func (*ResourceAttachRequest_Init) EqualVT

func (this *ResourceAttachRequest_Init) EqualVT(thatIface isResourceAttachRequest_Body) bool

func (*ResourceAttachRequest_Init) MarshalToSizedBufferVT

func (m *ResourceAttachRequest_Init) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachRequest_Init) MarshalToVT

func (m *ResourceAttachRequest_Init) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachRequest_Init) SizeVT

func (m *ResourceAttachRequest_Init) SizeVT() (n int)

type ResourceAttachRequest_MuxData

type ResourceAttachRequest_MuxData struct {
	// MuxData carries yamux multiplexer frames after handshake.
	MuxData []byte `protobuf:"bytes,4,opt,name=mux_data,json=muxData,proto3,oneof"`
}

func (*ResourceAttachRequest_MuxData) CloneOneofVT

func (m *ResourceAttachRequest_MuxData) CloneOneofVT() isResourceAttachRequest_Body

func (*ResourceAttachRequest_MuxData) CloneVT

func (*ResourceAttachRequest_MuxData) EqualVT

func (this *ResourceAttachRequest_MuxData) EqualVT(thatIface isResourceAttachRequest_Body) bool

func (*ResourceAttachRequest_MuxData) MarshalToSizedBufferVT

func (m *ResourceAttachRequest_MuxData) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachRequest_MuxData) MarshalToVT

func (m *ResourceAttachRequest_MuxData) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachRequest_MuxData) SizeVT

func (m *ResourceAttachRequest_MuxData) SizeVT() (n int)

type ResourceAttachResponse

type ResourceAttachResponse struct {

	// Body is the body of the response.
	//
	// Types that are assignable to Body:
	//
	//	*ResourceAttachResponse_Ack
	//	*ResourceAttachResponse_AddAck
	//	*ResourceAttachResponse_DetachAck
	//	*ResourceAttachResponse_MuxData
	Body isResourceAttachResponse_Body `protobuf_oneof:"body"`
	// contains filtered or unexported fields
}

ResourceAttachResponse is a server-to-client message on the ResourceAttach stream.

func (*ResourceAttachResponse) CloneMessageVT

func (*ResourceAttachResponse) CloneVT

func (*ResourceAttachResponse) EqualMessageVT

func (this *ResourceAttachResponse) EqualMessageVT(thatMsg any) bool

func (*ResourceAttachResponse) EqualVT

func (this *ResourceAttachResponse) EqualVT(that *ResourceAttachResponse) bool

func (*ResourceAttachResponse) GetAck

func (*ResourceAttachResponse) GetAddAck

func (*ResourceAttachResponse) GetBody

func (m *ResourceAttachResponse) GetBody() isResourceAttachResponse_Body

func (*ResourceAttachResponse) GetDetachAck

func (*ResourceAttachResponse) GetMuxData

func (x *ResourceAttachResponse) GetMuxData() []byte

func (*ResourceAttachResponse) MarshalJSON

func (x *ResourceAttachResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceAttachResponse to JSON.

func (*ResourceAttachResponse) MarshalProtoJSON

func (x *ResourceAttachResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceAttachResponse message to JSON.

func (*ResourceAttachResponse) MarshalProtoText

func (x *ResourceAttachResponse) MarshalProtoText() string

func (*ResourceAttachResponse) MarshalToSizedBufferVT

func (m *ResourceAttachResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachResponse) MarshalToVT

func (m *ResourceAttachResponse) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachResponse) MarshalVT

func (m *ResourceAttachResponse) MarshalVT() (dAtA []byte, err error)

func (*ResourceAttachResponse) ProtoMessage

func (*ResourceAttachResponse) ProtoMessage()

func (*ResourceAttachResponse) Reset

func (x *ResourceAttachResponse) Reset()

func (*ResourceAttachResponse) SizeVT

func (m *ResourceAttachResponse) SizeVT() (n int)

func (*ResourceAttachResponse) String

func (x *ResourceAttachResponse) String() string

func (*ResourceAttachResponse) UnmarshalJSON

func (x *ResourceAttachResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceAttachResponse from JSON.

func (*ResourceAttachResponse) UnmarshalProtoJSON

func (x *ResourceAttachResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceAttachResponse message from JSON.

func (*ResourceAttachResponse) UnmarshalVT

func (m *ResourceAttachResponse) UnmarshalVT(dAtA []byte) error

type ResourceAttachResponse_Ack

type ResourceAttachResponse_Ack struct {
	// Ack is the session acknowledgment.
	Ack *ResourceAttachAck `protobuf:"bytes,1,opt,name=ack,proto3,oneof"`
}

func (*ResourceAttachResponse_Ack) CloneOneofVT

func (m *ResourceAttachResponse_Ack) CloneOneofVT() isResourceAttachResponse_Body

func (*ResourceAttachResponse_Ack) CloneVT

func (*ResourceAttachResponse_Ack) EqualVT

func (this *ResourceAttachResponse_Ack) EqualVT(thatIface isResourceAttachResponse_Body) bool

func (*ResourceAttachResponse_Ack) MarshalToSizedBufferVT

func (m *ResourceAttachResponse_Ack) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachResponse_Ack) MarshalToVT

func (m *ResourceAttachResponse_Ack) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachResponse_Ack) SizeVT

func (m *ResourceAttachResponse_Ack) SizeVT() (n int)

type ResourceAttachResponse_AddAck

type ResourceAttachResponse_AddAck struct {
	// AddAck confirms a resource was added.
	AddAck *ResourceAttachAddAck `protobuf:"bytes,2,opt,name=add_ack,json=addAck,proto3,oneof"`
}

func (*ResourceAttachResponse_AddAck) CloneOneofVT

func (m *ResourceAttachResponse_AddAck) CloneOneofVT() isResourceAttachResponse_Body

func (*ResourceAttachResponse_AddAck) CloneVT

func (*ResourceAttachResponse_AddAck) EqualVT

func (this *ResourceAttachResponse_AddAck) EqualVT(thatIface isResourceAttachResponse_Body) bool

func (*ResourceAttachResponse_AddAck) MarshalToSizedBufferVT

func (m *ResourceAttachResponse_AddAck) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachResponse_AddAck) MarshalToVT

func (m *ResourceAttachResponse_AddAck) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachResponse_AddAck) SizeVT

func (m *ResourceAttachResponse_AddAck) SizeVT() (n int)

type ResourceAttachResponse_DetachAck

type ResourceAttachResponse_DetachAck struct {
	// DetachAck confirms a resource was detached.
	DetachAck *ResourceAttachDetachAck `protobuf:"bytes,3,opt,name=detach_ack,json=detachAck,proto3,oneof"`
}

func (*ResourceAttachResponse_DetachAck) CloneOneofVT

func (m *ResourceAttachResponse_DetachAck) CloneOneofVT() isResourceAttachResponse_Body

func (*ResourceAttachResponse_DetachAck) CloneVT

func (*ResourceAttachResponse_DetachAck) EqualVT

func (this *ResourceAttachResponse_DetachAck) EqualVT(thatIface isResourceAttachResponse_Body) bool

func (*ResourceAttachResponse_DetachAck) MarshalToSizedBufferVT

func (m *ResourceAttachResponse_DetachAck) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachResponse_DetachAck) MarshalToVT

func (m *ResourceAttachResponse_DetachAck) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachResponse_DetachAck) SizeVT

func (m *ResourceAttachResponse_DetachAck) SizeVT() (n int)

type ResourceAttachResponse_MuxData

type ResourceAttachResponse_MuxData struct {
	// MuxData carries yamux multiplexer frames after handshake.
	MuxData []byte `protobuf:"bytes,4,opt,name=mux_data,json=muxData,proto3,oneof"`
}

func (*ResourceAttachResponse_MuxData) CloneOneofVT

func (m *ResourceAttachResponse_MuxData) CloneOneofVT() isResourceAttachResponse_Body

func (*ResourceAttachResponse_MuxData) CloneVT

func (*ResourceAttachResponse_MuxData) EqualVT

func (this *ResourceAttachResponse_MuxData) EqualVT(thatIface isResourceAttachResponse_Body) bool

func (*ResourceAttachResponse_MuxData) MarshalToSizedBufferVT

func (m *ResourceAttachResponse_MuxData) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceAttachResponse_MuxData) MarshalToVT

func (m *ResourceAttachResponse_MuxData) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceAttachResponse_MuxData) SizeVT

func (m *ResourceAttachResponse_MuxData) SizeVT() (n int)

type ResourceClientInit

type ResourceClientInit struct {

	// ClientHandleId is the handle identifier for the client.
	// The client should use this ID going forward for requests.
	ClientHandleId uint32 `protobuf:"varint,1,opt,name=client_handle_id,json=clientHandleId,proto3" json:"clientHandleId,omitempty"`
	// RootResourceId is the ID of the root resource for this client.
	RootResourceId uint32 `protobuf:"varint,2,opt,name=root_resource_id,json=rootResourceId,proto3" json:"rootResourceId,omitempty"`
	// contains filtered or unexported fields
}

ResourceClientInit is the initialization response to ResourceClient.

func (*ResourceClientInit) CloneMessageVT

func (m *ResourceClientInit) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ResourceClientInit) CloneVT

func (m *ResourceClientInit) CloneVT() *ResourceClientInit

func (*ResourceClientInit) EqualMessageVT

func (this *ResourceClientInit) EqualMessageVT(thatMsg any) bool

func (*ResourceClientInit) EqualVT

func (this *ResourceClientInit) EqualVT(that *ResourceClientInit) bool

func (*ResourceClientInit) GetClientHandleId

func (x *ResourceClientInit) GetClientHandleId() uint32

func (*ResourceClientInit) GetRootResourceId

func (x *ResourceClientInit) GetRootResourceId() uint32

func (*ResourceClientInit) MarshalJSON

func (x *ResourceClientInit) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceClientInit to JSON.

func (*ResourceClientInit) MarshalProtoJSON

func (x *ResourceClientInit) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceClientInit message to JSON.

func (*ResourceClientInit) MarshalProtoText

func (x *ResourceClientInit) MarshalProtoText() string

func (*ResourceClientInit) MarshalToSizedBufferVT

func (m *ResourceClientInit) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceClientInit) MarshalToVT

func (m *ResourceClientInit) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceClientInit) MarshalVT

func (m *ResourceClientInit) MarshalVT() (dAtA []byte, err error)

func (*ResourceClientInit) ProtoMessage

func (*ResourceClientInit) ProtoMessage()

func (*ResourceClientInit) Reset

func (x *ResourceClientInit) Reset()

func (*ResourceClientInit) SizeVT

func (m *ResourceClientInit) SizeVT() (n int)

func (*ResourceClientInit) String

func (x *ResourceClientInit) String() string

func (*ResourceClientInit) UnmarshalJSON

func (x *ResourceClientInit) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceClientInit from JSON.

func (*ResourceClientInit) UnmarshalProtoJSON

func (x *ResourceClientInit) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceClientInit message from JSON.

func (*ResourceClientInit) UnmarshalVT

func (m *ResourceClientInit) UnmarshalVT(dAtA []byte) error

type ResourceClientRequest

type ResourceClientRequest struct {
	// contains filtered or unexported fields
}

ResourceClientRequest is the request body for ResourceClient.

func (*ResourceClientRequest) CloneMessageVT

func (*ResourceClientRequest) CloneVT

func (*ResourceClientRequest) EqualMessageVT

func (this *ResourceClientRequest) EqualMessageVT(thatMsg any) bool

func (*ResourceClientRequest) EqualVT

func (this *ResourceClientRequest) EqualVT(that *ResourceClientRequest) bool

func (*ResourceClientRequest) MarshalJSON

func (x *ResourceClientRequest) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceClientRequest to JSON.

func (*ResourceClientRequest) MarshalProtoJSON

func (x *ResourceClientRequest) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceClientRequest message to JSON.

func (*ResourceClientRequest) MarshalProtoText

func (x *ResourceClientRequest) MarshalProtoText() string

func (*ResourceClientRequest) MarshalToSizedBufferVT

func (m *ResourceClientRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceClientRequest) MarshalToVT

func (m *ResourceClientRequest) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceClientRequest) MarshalVT

func (m *ResourceClientRequest) MarshalVT() (dAtA []byte, err error)

func (*ResourceClientRequest) ProtoMessage

func (*ResourceClientRequest) ProtoMessage()

func (*ResourceClientRequest) Reset

func (x *ResourceClientRequest) Reset()

func (*ResourceClientRequest) SizeVT

func (m *ResourceClientRequest) SizeVT() (n int)

func (*ResourceClientRequest) String

func (x *ResourceClientRequest) String() string

func (*ResourceClientRequest) UnmarshalJSON

func (x *ResourceClientRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceClientRequest from JSON.

func (*ResourceClientRequest) UnmarshalProtoJSON

func (x *ResourceClientRequest) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceClientRequest message from JSON.

func (*ResourceClientRequest) UnmarshalVT

func (m *ResourceClientRequest) UnmarshalVT(dAtA []byte) error

type ResourceClientResponse

type ResourceClientResponse struct {

	// Body is the body of the event.
	//
	// Types that are assignable to Body:
	//
	//	*ResourceClientResponse_Init
	//	*ResourceClientResponse_ResourceReleased
	//	*ResourceClientResponse_ClientError
	Body isResourceClientResponse_Body `protobuf_oneof:"body"`
	// contains filtered or unexported fields
}

ResourceClientResponse contains a server-client message for a ResourceClient request.

func (*ResourceClientResponse) CloneMessageVT

func (*ResourceClientResponse) CloneVT

func (*ResourceClientResponse) EqualMessageVT

func (this *ResourceClientResponse) EqualMessageVT(thatMsg any) bool

func (*ResourceClientResponse) EqualVT

func (this *ResourceClientResponse) EqualVT(that *ResourceClientResponse) bool

func (*ResourceClientResponse) GetBody

func (m *ResourceClientResponse) GetBody() isResourceClientResponse_Body

func (*ResourceClientResponse) GetClientError

func (x *ResourceClientResponse) GetClientError() string

func (*ResourceClientResponse) GetInit

func (*ResourceClientResponse) GetResourceReleased

func (x *ResourceClientResponse) GetResourceReleased() *ResourceReleasedResponse

func (*ResourceClientResponse) MarshalJSON

func (x *ResourceClientResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceClientResponse to JSON.

func (*ResourceClientResponse) MarshalProtoJSON

func (x *ResourceClientResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceClientResponse message to JSON.

func (*ResourceClientResponse) MarshalProtoText

func (x *ResourceClientResponse) MarshalProtoText() string

func (*ResourceClientResponse) MarshalToSizedBufferVT

func (m *ResourceClientResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceClientResponse) MarshalToVT

func (m *ResourceClientResponse) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceClientResponse) MarshalVT

func (m *ResourceClientResponse) MarshalVT() (dAtA []byte, err error)

func (*ResourceClientResponse) ProtoMessage

func (*ResourceClientResponse) ProtoMessage()

func (*ResourceClientResponse) Reset

func (x *ResourceClientResponse) Reset()

func (*ResourceClientResponse) SizeVT

func (m *ResourceClientResponse) SizeVT() (n int)

func (*ResourceClientResponse) String

func (x *ResourceClientResponse) String() string

func (*ResourceClientResponse) UnmarshalJSON

func (x *ResourceClientResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceClientResponse from JSON.

func (*ResourceClientResponse) UnmarshalProtoJSON

func (x *ResourceClientResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceClientResponse message from JSON.

func (*ResourceClientResponse) UnmarshalVT

func (m *ResourceClientResponse) UnmarshalVT(dAtA []byte) error

type ResourceClientResponse_ClientError

type ResourceClientResponse_ClientError struct {
	// ClientError contains the fatal error returned by the call, if any.
	// If sent, this will be the last message in the rpc stream.
	ClientError string `protobuf:"bytes,3,opt,name=client_error,json=clientError,proto3,oneof"`
}

func (*ResourceClientResponse_ClientError) CloneOneofVT

func (m *ResourceClientResponse_ClientError) CloneOneofVT() isResourceClientResponse_Body

func (*ResourceClientResponse_ClientError) CloneVT

func (*ResourceClientResponse_ClientError) EqualVT

func (this *ResourceClientResponse_ClientError) EqualVT(thatIface isResourceClientResponse_Body) bool

func (*ResourceClientResponse_ClientError) MarshalToSizedBufferVT

func (m *ResourceClientResponse_ClientError) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceClientResponse_ClientError) MarshalToVT

func (m *ResourceClientResponse_ClientError) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceClientResponse_ClientError) SizeVT

func (m *ResourceClientResponse_ClientError) SizeVT() (n int)

type ResourceClientResponse_Init

type ResourceClientResponse_Init struct {
	// ResourceClientInit contains the initialization message for ResourceClient.
	// This is the first message sent on the stream and is only sent once.
	Init *ResourceClientInit `protobuf:"bytes,1,opt,name=init,proto3,oneof"`
}

func (*ResourceClientResponse_Init) CloneOneofVT

func (m *ResourceClientResponse_Init) CloneOneofVT() isResourceClientResponse_Body

func (*ResourceClientResponse_Init) CloneVT

func (*ResourceClientResponse_Init) EqualVT

func (this *ResourceClientResponse_Init) EqualVT(thatIface isResourceClientResponse_Body) bool

func (*ResourceClientResponse_Init) MarshalToSizedBufferVT

func (m *ResourceClientResponse_Init) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceClientResponse_Init) MarshalToVT

func (m *ResourceClientResponse_Init) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceClientResponse_Init) SizeVT

func (m *ResourceClientResponse_Init) SizeVT() (n int)

type ResourceClientResponse_ResourceReleased

type ResourceClientResponse_ResourceReleased struct {
	// ResourceRefReleased is returned if a resource was released by the server.
	ResourceReleased *ResourceReleasedResponse `protobuf:"bytes,2,opt,name=resource_released,json=resourceReleased,proto3,oneof"`
}

func (*ResourceClientResponse_ResourceReleased) CloneOneofVT

func (m *ResourceClientResponse_ResourceReleased) CloneOneofVT() isResourceClientResponse_Body

func (*ResourceClientResponse_ResourceReleased) CloneVT

func (*ResourceClientResponse_ResourceReleased) EqualVT

func (this *ResourceClientResponse_ResourceReleased) EqualVT(thatIface isResourceClientResponse_Body) bool

func (*ResourceClientResponse_ResourceReleased) MarshalToSizedBufferVT

func (m *ResourceClientResponse_ResourceReleased) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceClientResponse_ResourceReleased) MarshalToVT

func (m *ResourceClientResponse_ResourceReleased) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceClientResponse_ResourceReleased) SizeVT

type ResourceRefReleaseRequest

type ResourceRefReleaseRequest struct {

	// ClientHandleId is the handle identifier for the client.
	ClientHandleId uint32 `protobuf:"varint,1,opt,name=client_handle_id,json=clientHandleId,proto3" json:"clientHandleId,omitempty"`
	// ResourceId is the ID of the resource reference to release.
	ResourceId uint32 `protobuf:"varint,2,opt,name=resource_id,json=resourceId,proto3" json:"resourceId,omitempty"`
	// contains filtered or unexported fields
}

ResourceRefReleaseRequest is the request for ResourceRefRelease.

func (*ResourceRefReleaseRequest) CloneMessageVT

func (*ResourceRefReleaseRequest) CloneVT

func (*ResourceRefReleaseRequest) EqualMessageVT

func (this *ResourceRefReleaseRequest) EqualMessageVT(thatMsg any) bool

func (*ResourceRefReleaseRequest) EqualVT

func (*ResourceRefReleaseRequest) GetClientHandleId

func (x *ResourceRefReleaseRequest) GetClientHandleId() uint32

func (*ResourceRefReleaseRequest) GetResourceId

func (x *ResourceRefReleaseRequest) GetResourceId() uint32

func (*ResourceRefReleaseRequest) MarshalJSON

func (x *ResourceRefReleaseRequest) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceRefReleaseRequest to JSON.

func (*ResourceRefReleaseRequest) MarshalProtoJSON

func (x *ResourceRefReleaseRequest) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceRefReleaseRequest message to JSON.

func (*ResourceRefReleaseRequest) MarshalProtoText

func (x *ResourceRefReleaseRequest) MarshalProtoText() string

func (*ResourceRefReleaseRequest) MarshalToSizedBufferVT

func (m *ResourceRefReleaseRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceRefReleaseRequest) MarshalToVT

func (m *ResourceRefReleaseRequest) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceRefReleaseRequest) MarshalVT

func (m *ResourceRefReleaseRequest) MarshalVT() (dAtA []byte, err error)

func (*ResourceRefReleaseRequest) ProtoMessage

func (*ResourceRefReleaseRequest) ProtoMessage()

func (*ResourceRefReleaseRequest) Reset

func (x *ResourceRefReleaseRequest) Reset()

func (*ResourceRefReleaseRequest) SizeVT

func (m *ResourceRefReleaseRequest) SizeVT() (n int)

func (*ResourceRefReleaseRequest) String

func (x *ResourceRefReleaseRequest) String() string

func (*ResourceRefReleaseRequest) UnmarshalJSON

func (x *ResourceRefReleaseRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceRefReleaseRequest from JSON.

func (*ResourceRefReleaseRequest) UnmarshalProtoJSON

func (x *ResourceRefReleaseRequest) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceRefReleaseRequest message from JSON.

func (*ResourceRefReleaseRequest) UnmarshalVT

func (m *ResourceRefReleaseRequest) UnmarshalVT(dAtA []byte) error

type ResourceRefReleaseResponse

type ResourceRefReleaseResponse struct {
	// contains filtered or unexported fields
}

ResourceRefReleaseResponse is the response for ResourceRefRelease.

func (*ResourceRefReleaseResponse) CloneMessageVT

func (*ResourceRefReleaseResponse) CloneVT

func (*ResourceRefReleaseResponse) EqualMessageVT

func (this *ResourceRefReleaseResponse) EqualMessageVT(thatMsg any) bool

func (*ResourceRefReleaseResponse) EqualVT

func (*ResourceRefReleaseResponse) MarshalJSON

func (x *ResourceRefReleaseResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceRefReleaseResponse to JSON.

func (*ResourceRefReleaseResponse) MarshalProtoJSON

func (x *ResourceRefReleaseResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceRefReleaseResponse message to JSON.

func (*ResourceRefReleaseResponse) MarshalProtoText

func (x *ResourceRefReleaseResponse) MarshalProtoText() string

func (*ResourceRefReleaseResponse) MarshalToSizedBufferVT

func (m *ResourceRefReleaseResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceRefReleaseResponse) MarshalToVT

func (m *ResourceRefReleaseResponse) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceRefReleaseResponse) MarshalVT

func (m *ResourceRefReleaseResponse) MarshalVT() (dAtA []byte, err error)

func (*ResourceRefReleaseResponse) ProtoMessage

func (*ResourceRefReleaseResponse) ProtoMessage()

func (*ResourceRefReleaseResponse) Reset

func (x *ResourceRefReleaseResponse) Reset()

func (*ResourceRefReleaseResponse) SizeVT

func (m *ResourceRefReleaseResponse) SizeVT() (n int)

func (*ResourceRefReleaseResponse) String

func (x *ResourceRefReleaseResponse) String() string

func (*ResourceRefReleaseResponse) UnmarshalJSON

func (x *ResourceRefReleaseResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceRefReleaseResponse from JSON.

func (*ResourceRefReleaseResponse) UnmarshalProtoJSON

func (x *ResourceRefReleaseResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceRefReleaseResponse message from JSON.

func (*ResourceRefReleaseResponse) UnmarshalVT

func (m *ResourceRefReleaseResponse) UnmarshalVT(dAtA []byte) error

type ResourceReleasedResponse

type ResourceReleasedResponse struct {

	// ResourceId is the ID of the resource that was released.
	ResourceId uint32 `protobuf:"varint,1,opt,name=resource_id,json=resourceId,proto3" json:"resourceId,omitempty"`
	// contains filtered or unexported fields
}

ResourceReleasedResponse is a message indicating a resource was released.

func (*ResourceReleasedResponse) CloneMessageVT

func (*ResourceReleasedResponse) CloneVT

func (*ResourceReleasedResponse) EqualMessageVT

func (this *ResourceReleasedResponse) EqualMessageVT(thatMsg any) bool

func (*ResourceReleasedResponse) EqualVT

func (*ResourceReleasedResponse) GetResourceId

func (x *ResourceReleasedResponse) GetResourceId() uint32

func (*ResourceReleasedResponse) MarshalJSON

func (x *ResourceReleasedResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResourceReleasedResponse to JSON.

func (*ResourceReleasedResponse) MarshalProtoJSON

func (x *ResourceReleasedResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResourceReleasedResponse message to JSON.

func (*ResourceReleasedResponse) MarshalProtoText

func (x *ResourceReleasedResponse) MarshalProtoText() string

func (*ResourceReleasedResponse) MarshalToSizedBufferVT

func (m *ResourceReleasedResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResourceReleasedResponse) MarshalToVT

func (m *ResourceReleasedResponse) MarshalToVT(dAtA []byte) (int, error)

func (*ResourceReleasedResponse) MarshalVT

func (m *ResourceReleasedResponse) MarshalVT() (dAtA []byte, err error)

func (*ResourceReleasedResponse) ProtoMessage

func (*ResourceReleasedResponse) ProtoMessage()

func (*ResourceReleasedResponse) Reset

func (x *ResourceReleasedResponse) Reset()

func (*ResourceReleasedResponse) SizeVT

func (m *ResourceReleasedResponse) SizeVT() (n int)

func (*ResourceReleasedResponse) String

func (x *ResourceReleasedResponse) String() string

func (*ResourceReleasedResponse) UnmarshalJSON

func (x *ResourceReleasedResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResourceReleasedResponse from JSON.

func (*ResourceReleasedResponse) UnmarshalProtoJSON

func (x *ResourceReleasedResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResourceReleasedResponse message from JSON.

func (*ResourceReleasedResponse) UnmarshalVT

func (m *ResourceReleasedResponse) UnmarshalVT(dAtA []byte) error

type RoutedInvoker

type RoutedInvoker struct {
	// contains filtered or unexported fields
}

RoutedInvoker dispatches SRPC calls to the correct mux by parsing a resource ID prefix from the service ID. Used by the client to route incoming yamux sub-stream RPCs to the right attached resource.

func NewRoutedInvoker

func NewRoutedInvoker() *RoutedInvoker

NewRoutedInvoker creates a new RoutedInvoker.

func NewRoutedInvokerWithContext added in v0.51.2

func NewRoutedInvokerWithContext(contextFn func(context.Context, uint32) context.Context) *RoutedInvoker

NewRoutedInvokerWithContext creates a RoutedInvoker that can replace the stream context before invoking a routed mux.

func (*RoutedInvoker) InvokeMethod

func (r *RoutedInvoker) InvokeMethod(serviceID, methodID string, strm srpc.Stream) (bool, error)

InvokeMethod parses the resource ID prefix from serviceID and dispatches.

func (*RoutedInvoker) RemoveMux

func (r *RoutedInvoker) RemoveMux(resourceID uint32)

RemoveMux removes a mux for a resource ID.

func (*RoutedInvoker) SetMux

func (r *RoutedInvoker) SetMux(resourceID uint32, mux srpc.Invoker)

SetMux registers or replaces a mux for a resource ID.

type SRPCResourceServiceClient

type SRPCResourceServiceClient interface {
	// SRPCClient returns the underlying SRPC client.
	SRPCClient() srpc.Client

	// ResourceClient starts an instance of a client for the ResourceService,
	// yielding a new client ID. The client can use that ID for future RPCs
	// accessing the Resource tree. When the streaming RPC ends, references to
	// resources opened by the client will be released.
	ResourceClient(ctx context.Context, in *ResourceClientRequest) (SRPCResourceService_ResourceClientClient, error)
	// ResourceRpc is a rpc request for an open resource handle.
	// Exposes service(s) depending on the resource type.
	// Component ID: resource_id from ResourceClient call.
	ResourceRpc(ctx context.Context) (SRPCResourceService_ResourceRpcClient, error)
	// ResourceRefRelease releases a resource given a handle ID.
	// This is called when no references remain to a resource.
	ResourceRefRelease(ctx context.Context, in *ResourceRefReleaseRequest) (*ResourceRefReleaseResponse, error)
	// ResourceAttach allows a client to provide resources that server-side
	// RPC handlers can invoke via getAttachedRef(id). Session-only Init/Ack,
	// then resources registered via Add/AddAck. After Init/Ack, mux_data
	// carries yamux frames for all attached resources.
	ResourceAttach(ctx context.Context) (SRPCResourceService_ResourceAttachClient, error)
}

func NewSRPCResourceServiceClient

func NewSRPCResourceServiceClient(cc srpc.Client) SRPCResourceServiceClient

func NewSRPCResourceServiceClientWithServiceID

func NewSRPCResourceServiceClientWithServiceID(cc srpc.Client, serviceID string) SRPCResourceServiceClient

type SRPCResourceServiceHandler

type SRPCResourceServiceHandler struct {
	// contains filtered or unexported fields
}

func (SRPCResourceServiceHandler) GetMethodIDs

func (SRPCResourceServiceHandler) GetMethodIDs() []string

func (*SRPCResourceServiceHandler) GetServiceID

func (d *SRPCResourceServiceHandler) GetServiceID() string

func (*SRPCResourceServiceHandler) InvokeMethod

func (d *SRPCResourceServiceHandler) InvokeMethod(
	serviceID, methodID string,
	strm srpc.Stream,
) (bool, error)

func (SRPCResourceServiceHandler) InvokeMethod_ResourceAttach

func (SRPCResourceServiceHandler) InvokeMethod_ResourceAttach(impl SRPCResourceServiceServer, strm srpc.Stream) error

func (SRPCResourceServiceHandler) InvokeMethod_ResourceClient

func (SRPCResourceServiceHandler) InvokeMethod_ResourceClient(impl SRPCResourceServiceServer, strm srpc.Stream) error

func (SRPCResourceServiceHandler) InvokeMethod_ResourceRefRelease

func (SRPCResourceServiceHandler) InvokeMethod_ResourceRefRelease(impl SRPCResourceServiceServer, strm srpc.Stream) error

func (SRPCResourceServiceHandler) InvokeMethod_ResourceRpc

func (SRPCResourceServiceHandler) InvokeMethod_ResourceRpc(impl SRPCResourceServiceServer, strm srpc.Stream) error

type SRPCResourceServiceServer

type SRPCResourceServiceServer interface {
	// ResourceClient starts an instance of a client for the ResourceService,
	// yielding a new client ID. The client can use that ID for future RPCs
	// accessing the Resource tree. When the streaming RPC ends, references to
	// resources opened by the client will be released.
	ResourceClient(*ResourceClientRequest, SRPCResourceService_ResourceClientStream) error
	// ResourceRpc is a rpc request for an open resource handle.
	// Exposes service(s) depending on the resource type.
	// Component ID: resource_id from ResourceClient call.
	ResourceRpc(SRPCResourceService_ResourceRpcStream) error
	// ResourceRefRelease releases a resource given a handle ID.
	// This is called when no references remain to a resource.
	ResourceRefRelease(context.Context, *ResourceRefReleaseRequest) (*ResourceRefReleaseResponse, error)
	// ResourceAttach allows a client to provide resources that server-side
	// RPC handlers can invoke via getAttachedRef(id). Session-only Init/Ack,
	// then resources registered via Add/AddAck. After Init/Ack, mux_data
	// carries yamux frames for all attached resources.
	ResourceAttach(SRPCResourceService_ResourceAttachStream) error
}

type SRPCResourceService_ResourceAttachClient

type SRPCResourceService_ResourceAttachClient interface {
	srpc.Stream
	Send(*ResourceAttachRequest) error
	Recv() (*ResourceAttachResponse, error)
	RecvTo(*ResourceAttachResponse) error
}

type SRPCResourceService_ResourceAttachStream

type SRPCResourceService_ResourceAttachStream interface {
	srpc.Stream
	Send(*ResourceAttachResponse) error
	SendAndClose(*ResourceAttachResponse) error
	Recv() (*ResourceAttachRequest, error)
	RecvTo(*ResourceAttachRequest) error
}

type SRPCResourceService_ResourceClientClient

type SRPCResourceService_ResourceClientClient interface {
	srpc.Stream
	Recv() (*ResourceClientResponse, error)
	RecvTo(*ResourceClientResponse) error
}

type SRPCResourceService_ResourceClientStream

type SRPCResourceService_ResourceClientStream interface {
	srpc.Stream
	Send(*ResourceClientResponse) error
	SendAndClose(*ResourceClientResponse) error
}

type SRPCResourceService_ResourceRefReleaseStream

type SRPCResourceService_ResourceRefReleaseStream interface {
	srpc.Stream
}

type SRPCResourceService_ResourceRpcClient

type SRPCResourceService_ResourceRpcClient interface {
	srpc.Stream
	Send(*rpcstream.RpcStreamPacket) error
	Recv() (*rpcstream.RpcStreamPacket, error)
	RecvTo(*rpcstream.RpcStreamPacket) error
}

type SRPCResourceService_ResourceRpcStream

type SRPCResourceService_ResourceRpcStream interface {
	srpc.Stream
	Send(*rpcstream.RpcStreamPacket) error
	SendAndClose(*rpcstream.RpcStreamPacket) error
	Recv() (*rpcstream.RpcStreamPacket, error)
	RecvTo(*rpcstream.RpcStreamPacket) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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