dialer

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

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"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

DialerOpts contains options relating to dialing a statically configured peer.

func (*DialerOpts) Descriptor

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

func (*DialerOpts) GetAddress

func (m *DialerOpts) GetAddress() string

func (*DialerOpts) GetBackoff

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

func (*DialerOpts) ProtoMessage

func (*DialerOpts) ProtoMessage()

func (*DialerOpts) Reset

func (m *DialerOpts) Reset()

func (*DialerOpts) String

func (m *DialerOpts) String() string

func (*DialerOpts) XXX_DiscardUnknown

func (m *DialerOpts) XXX_DiscardUnknown()

func (*DialerOpts) XXX_Marshal

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

func (*DialerOpts) XXX_Merge

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

func (*DialerOpts) XXX_Size

func (m *DialerOpts) XXX_Size() int

func (*DialerOpts) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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