stream_api_dial

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 11 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:"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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Config configures the dial controller.

func (*Config) Descriptor

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

func (*Config) GetEncrypted

func (m *Config) GetEncrypted() bool

func (*Config) GetLocalPeerId

func (m *Config) GetLocalPeerId() string

func (*Config) GetPeerId

func (m *Config) GetPeerId() string

func (*Config) GetProtocolId

func (m *Config) GetProtocolId() string

func (*Config) GetReliable

func (m *Config) GetReliable() bool

func (*Config) GetTransportId

func (m *Config) GetTransportId() uint64

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 (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

func (*Config) Validate

func (c *Config) Validate() error

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

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

func (m *Config) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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