Documentation ¶
Index ¶
- Constants
- type Endpoint
- func (t *Endpoint) Close() error
- func (t *Endpoint) Init(ctx context.Context, logger *slog.Logger, addIntent dndm.IntentCallback, ...) error
- func (t *Endpoint) Latency() *LatencyTracker
- func (t *Endpoint) Local() dndm.Peer
- func (t *Endpoint) OnClose(f func()) dndm.Endpoint
- func (t *Endpoint) Publish(route dndm.Route, opt ...dndm.PubOpt) (dndm.Intent, error)
- func (t *Endpoint) Remote() dndm.Peer
- func (t *Endpoint) Subscribe(route dndm.Route, opt ...dndm.SubOpt) (dndm.Interest, error)
- type LatencyTracker
- type LocalIntent
- type LocalInterest
- type Ping
- type Pong
- type RemoteIntent
- type RemoteInterest
- type Watchdog
Constants ¶
View Source
const DefaultTimeToLive = time.Hour * 24 * 30 * 365
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct { dndm.BaseEndpoint // contains filtered or unexported fields }
func New ¶
func New(self dndm.Peer, conn network.Conn, size int, timeout, pingDuration time.Duration) *Endpoint
New creates a endpoint that communicates with a remote via Remote interface.
func (*Endpoint) Init ¶
func (t *Endpoint) Init(ctx context.Context, logger *slog.Logger, addIntent dndm.IntentCallback, addInterest dndm.InterestCallback) error
func (*Endpoint) Latency ¶
func (t *Endpoint) Latency() *LatencyTracker
type LatencyTracker ¶
type LatencyTracker struct {
// contains filtered or unexported fields
}
func NewLatencyTracker ¶
func NewLatencyTracker(size int) *LatencyTracker
func (*LatencyTracker) ObservePong ¶
func (l *LatencyTracker) ObservePong(hdr *types.Header, msg *types.Pong)
type LocalIntent ¶
type LocalIntent struct { *dndm.LocalIntent // contains filtered or unexported fields }
func (*LocalIntent) Close ¶
func (i *LocalIntent) Close() error
func (*LocalIntent) Link ¶
func (i *LocalIntent) Link(c chan<- proto.Message)
type LocalInterest ¶
type LocalInterest struct { *dndm.LocalInterest // contains filtered or unexported fields }
func (*LocalInterest) Close ¶
func (i *LocalInterest) Close() error
type RemoteIntent ¶
type RemoteIntent struct { *dndm.LocalIntent // contains filtered or unexported fields }
func (*RemoteIntent) Close ¶
func (i *RemoteIntent) Close() error
func (*RemoteIntent) Link ¶
func (i *RemoteIntent) Link(c chan<- proto.Message)
type RemoteInterest ¶
type RemoteInterest struct { *dndm.LocalInterest // contains filtered or unexported fields }
func (*RemoteInterest) Close ¶
func (i *RemoteInterest) Close() error
Click to show internal directories.
Click to hide internal directories.