stream_drpc

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_aperturerobotics_bifrost_stream_drpc_drpc_proto protoreflect.FileDescriptor

Functions

func EstablishDrpcConn

func EstablishDrpcConn(
	ctx context.Context,
	b bus.Bus,
	opts *DrpcOpts,
	protocolID protocol.ID,
	srcPeer, destPeer peer.ID,
	transportID uint64,
) (*drpcconn.Conn, func(), error)

EstablishDrpcConn establishes a drpc connection with a peer.

srcPeer, transportID can be empty.

func NewDrpcConn

func NewDrpcConn(ctx context.Context, strm stream.Stream, opts *DrpcOpts) (*drpcconn.Conn, error)

NewDrpcConn constructs a new dprc conn from a stream.

Types

type DrpcOpts

type DrpcOpts struct {

	// ManagerOpts are drpc manager options.
	ManagerOpts *ManagerOpts `protobuf:"bytes,1,opt,name=manager_opts,json=managerOpts,proto3" json:"manager_opts,omitempty"`
	// contains filtered or unexported fields
}

DprcOpts are drpc connection options.

func (*DrpcOpts) BuildOpts

func (o *DrpcOpts) BuildOpts() (drpcconn.Options, error)

BuildOpts converts to drpc conn opts.

func (*DrpcOpts) CloneMessageVT added in v0.15.6

func (m *DrpcOpts) CloneMessageVT() proto.Message

func (*DrpcOpts) CloneVT added in v0.8.3

func (m *DrpcOpts) CloneVT() *DrpcOpts

func (*DrpcOpts) Descriptor deprecated

func (*DrpcOpts) Descriptor() ([]byte, []int)

Deprecated: Use DrpcOpts.ProtoReflect.Descriptor instead.

func (*DrpcOpts) EqualMessageVT added in v0.15.6

func (this *DrpcOpts) EqualMessageVT(thatMsg proto.Message) bool

func (*DrpcOpts) EqualVT added in v0.3.0

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

func (*DrpcOpts) GetManagerOpts

func (x *DrpcOpts) GetManagerOpts() *ManagerOpts

func (*DrpcOpts) MarshalToSizedBufferVT added in v0.2.0

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

func (*DrpcOpts) MarshalToVT added in v0.2.0

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

func (*DrpcOpts) MarshalVT added in v0.2.0

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

func (*DrpcOpts) ProtoMessage

func (*DrpcOpts) ProtoMessage()

func (*DrpcOpts) ProtoReflect added in v0.2.0

func (x *DrpcOpts) ProtoReflect() protoreflect.Message

func (*DrpcOpts) Reset

func (x *DrpcOpts) Reset()

func (*DrpcOpts) SizeVT added in v0.2.0

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

func (*DrpcOpts) String

func (x *DrpcOpts) String() string

func (*DrpcOpts) UnmarshalVT added in v0.2.0

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

func (*DrpcOpts) Validate

func (o *DrpcOpts) Validate() error

Validate checks the ops.

type ManagerOpts

type ManagerOpts struct {

	// WriterBufferSize controls the size of the buffer that we will fill before
	// flushing. Normal writes to streams typically issue a flush explicitly.
	WriterBufferSize uint32 `protobuf:"varint,1,opt,name=writer_buffer_size,json=writerBufferSize,proto3" json:"writer_buffer_size,omitempty"`
	// StreamOpts are options for streams created by the manager.
	StreamOpts *StreamOpts `protobuf:"bytes,2,opt,name=stream_opts,json=streamOpts,proto3" json:"stream_opts,omitempty"`
	// InactivityTimeout is the amount of time the manager will wait when creating
	// a NewServerStream. It only includes the time it is reading packets from the
	// remote client. In other words, it only includes the time that the client
	// could delay before invoking an RPC. If zero or negative, no timeout.
	InactivityTimeout string `protobuf:"bytes,3,opt,name=inactivity_timeout,json=inactivityTimeout,proto3" json:"inactivity_timeout,omitempty"`
	// contains filtered or unexported fields
}

ManagerOpts are drpc manager options.

func (*ManagerOpts) BuildOpts

func (o *ManagerOpts) BuildOpts() (drpcmanager.Options, error)

BuildOpts converts to manager opts.

func (*ManagerOpts) CloneMessageVT added in v0.15.6

func (m *ManagerOpts) CloneMessageVT() proto.Message

func (*ManagerOpts) CloneVT added in v0.8.3

func (m *ManagerOpts) CloneVT() *ManagerOpts

func (*ManagerOpts) Descriptor deprecated

func (*ManagerOpts) Descriptor() ([]byte, []int)

Deprecated: Use ManagerOpts.ProtoReflect.Descriptor instead.

func (*ManagerOpts) EqualMessageVT added in v0.15.6

func (this *ManagerOpts) EqualMessageVT(thatMsg proto.Message) bool

func (*ManagerOpts) EqualVT added in v0.3.0

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

func (*ManagerOpts) GetInactivityTimeout

func (x *ManagerOpts) GetInactivityTimeout() string

func (*ManagerOpts) GetStreamOpts

func (x *ManagerOpts) GetStreamOpts() *StreamOpts

func (*ManagerOpts) GetWriterBufferSize

func (x *ManagerOpts) GetWriterBufferSize() uint32

func (*ManagerOpts) MarshalToSizedBufferVT added in v0.2.0

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

func (*ManagerOpts) MarshalToVT added in v0.2.0

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

func (*ManagerOpts) MarshalVT added in v0.2.0

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

func (*ManagerOpts) ParseInactivityTimeout

func (o *ManagerOpts) ParseInactivityTimeout() (time.Duration, error)

ParseInactivityTimeout parses the inactivity timeout field.

func (*ManagerOpts) ProtoMessage

func (*ManagerOpts) ProtoMessage()

func (*ManagerOpts) ProtoReflect added in v0.2.0

func (x *ManagerOpts) ProtoReflect() protoreflect.Message

func (*ManagerOpts) Reset

func (x *ManagerOpts) Reset()

func (*ManagerOpts) SizeVT added in v0.2.0

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

func (*ManagerOpts) String

func (x *ManagerOpts) String() string

func (*ManagerOpts) UnmarshalVT added in v0.2.0

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

func (*ManagerOpts) Validate

func (o *ManagerOpts) Validate() error

Validate checks the ops.

type StreamOpts

type StreamOpts struct {

	// SplitSize controls the default size we split packets into frames.
	SplitSize uint32 `protobuf:"varint,1,opt,name=split_size,json=splitSize,proto3" json:"split_size,omitempty"`
	// contains filtered or unexported fields
}

StreamOpts are options for a drpc stream.

func (*StreamOpts) BuildOpts

func (o *StreamOpts) BuildOpts() drpcstream.Options

BuildOpts converts to stream opts.

func (*StreamOpts) CloneMessageVT added in v0.15.6

func (m *StreamOpts) CloneMessageVT() proto.Message

func (*StreamOpts) CloneVT added in v0.8.3

func (m *StreamOpts) CloneVT() *StreamOpts

func (*StreamOpts) Descriptor deprecated

func (*StreamOpts) Descriptor() ([]byte, []int)

Deprecated: Use StreamOpts.ProtoReflect.Descriptor instead.

func (*StreamOpts) EqualMessageVT added in v0.15.6

func (this *StreamOpts) EqualMessageVT(thatMsg proto.Message) bool

func (*StreamOpts) EqualVT added in v0.3.0

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

func (*StreamOpts) GetSplitSize

func (x *StreamOpts) GetSplitSize() uint32

func (*StreamOpts) MarshalToSizedBufferVT added in v0.2.0

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

func (*StreamOpts) MarshalToVT added in v0.2.0

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

func (*StreamOpts) MarshalVT added in v0.2.0

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

func (*StreamOpts) ProtoMessage

func (*StreamOpts) ProtoMessage()

func (*StreamOpts) ProtoReflect added in v0.2.0

func (x *StreamOpts) ProtoReflect() protoreflect.Message

func (*StreamOpts) Reset

func (x *StreamOpts) Reset()

func (*StreamOpts) SizeVT added in v0.2.0

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

func (*StreamOpts) String

func (x *StreamOpts) String() string

func (*StreamOpts) UnmarshalVT added in v0.2.0

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

func (*StreamOpts) Validate

func (o *StreamOpts) Validate() error

Validate checks the ops.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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