stream_api_dial

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 16 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_api_dial_dial_proto protoreflect.FileDescriptor

Functions

func ProcessRPC

func ProcessRPC(
	ctx context.Context,
	b bus.Bus,
	conf *Config,
	rpc stream_api.RPC,
) error

ProcessRPC processes an RPC by dialing the desired target.

Types

type Config

type Config struct {

	// PeerId is the remote peer ID to dial.
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	// LocalPeerId is the peer ID to dial with.
	// Can be empty to accept any loaded peer.
	LocalPeerId string `protobuf:"bytes,2,opt,name=local_peer_id,json=localPeerId,proto3" json:"local_peer_id,omitempty"`
	// ProtocolId is the protocol ID to dial with.
	ProtocolId string `protobuf:"bytes,3,opt,name=protocol_id,json=protocolId,proto3" json:"protocol_id,omitempty"`
	// TransportId constrains the transport ID to dial with.
	// Can be empty.
	TransportId uint64 `protobuf:"varint,4,opt,name=transport_id,json=transportId,proto3" json:"transport_id,omitempty"`
	// Encrypted indicates the stream should be encrypted.
	Encrypted bool `protobuf:"varint,5,opt,name=encrypted,proto3" json:"encrypted,omitempty"`
	// Reliable indicates the stream should be reliable.
	Reliable bool `protobuf:"varint,6,opt,name=reliable,proto3" json:"reliable,omitempty"`
	// contains filtered or unexported fields
}

Config configures the dial controller.

func (*Config) CloneGenericVT added in v0.8.3

func (m *Config) CloneGenericVT() 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) EqualVT added in v0.3.0

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

func (*Config) GetEncrypted

func (x *Config) GetEncrypted() bool

func (*Config) GetLocalPeerId

func (x *Config) GetLocalPeerId() string

func (*Config) GetPeerId

func (x *Config) GetPeerId() string

func (*Config) GetProtocolId

func (x *Config) GetProtocolId() string

func (*Config) GetReliable

func (x *Config) GetReliable() bool

func (*Config) GetTransportId

func (x *Config) GetTransportId() uint64

func (*Config) MarshalToSizedBufferVT added in v0.2.0

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

func (*Config) MarshalToVT added in v0.2.0

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

func (*Config) MarshalVT added in v0.2.0

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

func (*Config) ParseLocalPeerID

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

ParseLocalPeerID parses the local peer ID constraint. may be empty.

func (*Config) ParsePeerID

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

ParsePeerID parses the target peer ID constraint.

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect added in v0.2.0

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) SizeVT added in v0.2.0

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

func (*Config) String

func (x *Config) String() string

func (*Config) UnmarshalVT added in v0.2.0

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

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration. This is a cursory validation to see if the values "look correct."

Jump to

Keyboard shortcuts

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