stream_api_dial

package
v0.30.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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:"peerId,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:"localPeerId,omitempty"`
	// ProtocolId is the protocol ID to dial with.
	ProtocolId string `protobuf:"bytes,3,opt,name=protocol_id,json=protocolId,proto3" json:"protocolId,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:"transportId,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) CloneMessageVT added in v0.15.6

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

func (*Config) CloneVT added in v0.8.3

func (m *Config) CloneVT() *Config

func (*Config) EqualMessageVT added in v0.15.6

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

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) MarshalJSON added in v0.29.0

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

MarshalJSON marshals the Config to JSON.

func (*Config) MarshalProtoJSON added in v0.29.0

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

MarshalProtoJSON marshals the Config message to JSON.

func (*Config) MarshalProtoText added in v0.29.2

func (x *Config) MarshalProtoText() string

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) 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) UnmarshalJSON added in v0.29.0

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

UnmarshalJSON unmarshals the Config from JSON.

func (*Config) UnmarshalProtoJSON added in v0.29.0

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

UnmarshalProtoJSON unmarshals the Config message from JSON.

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