dialer

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 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_transport_common_dialer_dialer_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Dialer

type Dialer struct {
	// contains filtered or unexported fields
}

Dialer manages a transport dialer.

func NewDialer

func NewDialer(
	le *logrus.Entry,
	tptDialer transport.TransportDialer,
	opts *DialerOpts,
	peerID peer.ID,
	address string,
) *Dialer

NewDialer constructs a new Dialer

func (*Dialer) Execute

func (d *Dialer) Execute(ctx context.Context) error

Execute executes the dialer, with backoff.

type DialerOpts

type DialerOpts struct {

	// Address is the address of the peer, in the format expected by the transport.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Backoff is the dialing backoff configuration.
	// Can be empty.
	Backoff *backoff.Backoff `protobuf:"bytes,2,opt,name=backoff,proto3" json:"backoff,omitempty"`
	// contains filtered or unexported fields
}

DialerOpts contains options relating to dialing a statically configured peer.

func (*DialerOpts) CloneMessageVT added in v0.15.6

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

func (*DialerOpts) CloneVT added in v0.8.3

func (m *DialerOpts) CloneVT() *DialerOpts

func (*DialerOpts) Descriptor deprecated

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

Deprecated: Use DialerOpts.ProtoReflect.Descriptor instead.

func (*DialerOpts) EqualMessageVT added in v0.15.6

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

func (*DialerOpts) EqualVT added in v0.3.0

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

func (*DialerOpts) GetAddress

func (x *DialerOpts) GetAddress() string

func (*DialerOpts) GetBackoff

func (x *DialerOpts) GetBackoff() *backoff.Backoff

func (*DialerOpts) MarshalToSizedBufferVT added in v0.2.0

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

func (*DialerOpts) MarshalToVT added in v0.2.0

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

func (*DialerOpts) MarshalVT added in v0.2.0

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

func (*DialerOpts) ProtoMessage

func (*DialerOpts) ProtoMessage()

func (*DialerOpts) ProtoReflect added in v0.2.0

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

func (*DialerOpts) Reset

func (x *DialerOpts) Reset()

func (*DialerOpts) SizeVT added in v0.2.0

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

func (*DialerOpts) String

func (x *DialerOpts) String() string

func (*DialerOpts) UnmarshalVT added in v0.2.0

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

Jump to

Keyboard shortcuts

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