stream_srpc_client

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var File_github_com_aperturerobotics_bifrost_stream_srpc_client_client_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Client

type Client = srpc.Client

Client is a common srpc client implementation.

func NewClient

func NewClient(le *logrus.Entry, b bus.Bus, c *Config, protocolID protocol.ID) (Client, error)

NewClient constructs a new client.

type Config

type Config struct {

	// ServerPeerIds are the static list of peer IDs to contact.
	ServerPeerIds []string `protobuf:"bytes,1,rep,name=server_peer_ids,json=serverPeerIds,proto3" json:"server_peer_ids,omitempty"`
	// PerServerBackoff is the server peer error backoff configuration.
	// Can be empty.
	PerServerBackoff *backoff.Backoff `protobuf:"bytes,2,opt,name=per_server_backoff,json=perServerBackoff,proto3" json:"per_server_backoff,omitempty"`
	// SrcPeerId is the source peer id to contact from.
	// Can be empty.
	SrcPeerId string `protobuf:"bytes,3,opt,name=src_peer_id,json=srcPeerId,proto3" json:"src_peer_id,omitempty"`
	// TransportId restricts which transport we can dial out from.
	TransportId uint64 `protobuf:"varint,4,opt,name=transport_id,json=transportId,proto3" json:"transport_id,omitempty"`
	// TimeoutDur sets the per-server establish timeout.
	// If unset, no timeout.
	// Example: 15s
	TimeoutDur string `protobuf:"bytes,5,opt,name=timeout_dur,json=timeoutDur,proto3" json:"timeout_dur,omitempty"`
	// contains filtered or unexported fields
}

Config configures a client for a srpc service.

func (*Config) CloneMessageVT added in v0.15.6

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

func (*Config) CloneVT added in v0.8.3

func (m *Config) CloneVT() *Config

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) EqualMessageVT added in v0.15.6

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

func (*Config) EqualVT

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

func (*Config) GetPerServerBackoff

func (x *Config) GetPerServerBackoff() *backoff.Backoff

func (*Config) GetServerPeerIds

func (x *Config) GetServerPeerIds() []string

func (*Config) GetSrcPeerId

func (x *Config) GetSrcPeerId() string

func (*Config) GetTimeoutDur

func (x *Config) GetTimeoutDur() string

func (*Config) GetTransportId

func (x *Config) GetTransportId() uint64

func (*Config) MarshalToSizedBufferVT

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

func (*Config) MarshalToVT

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

func (*Config) MarshalVT

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

func (*Config) ParseServerPeerIds

func (c *Config) ParseServerPeerIds() ([]peer.ID, error)

ParseServerPeerIds parses the destination peer ids

func (*Config) ParseSrcPeerId

func (c *Config) ParseSrcPeerId() (peer.ID, error)

ParseSrcPeerId parses the source peer id, if set.

func (*Config) ParseTimeoutDur

func (c *Config) ParseTimeoutDur() (time.Duration, error)

ParseTimeoutDur parses the timeout duration. returns zero if empty

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) SizeVT

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

func (*Config) String

func (x *Config) String() string

func (*Config) UnmarshalVT

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

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the config.

Jump to

Keyboard shortcuts

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