consumer

package
v0.67.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer added in v0.54.0

type Layer struct {
	layer.BaseLayer
	// contains filtered or unexported fields
}

Layer is the ConsumerLayer.

func NewConsumerLayer

func NewConsumerLayer() *Layer

NewConsumerLayer creates a new consumer layer.

func (*Layer) AnnounceNexus added in v0.54.0

func (c *Layer) AnnounceNexus(belowNexus nexus.Nexus)

AnnounceNexus creates a new consumer.ConsumerNexus and starts the handshake.

func (*Layer) ConsumerFinishedCb added in v0.54.0

func (c *Layer) ConsumerFinishedCb(consumerNexus consumer.Nexus)

ConsumerFinishedCb is a call back for when a consumer is finished.

func (*Layer) OnPing added in v0.54.0

func (c *Layer) OnPing(consumerNexus nexus.Nexus, milliseconds int)

OnPing is an event fired on ping.

func (*Layer) RegisterAboveLayer added in v0.54.0

func (c *Layer) RegisterAboveLayer(belowLayer layer.Base)

RegisterAboveLayer registers the current nexuses announce/revoke nexuses to the below layer.

func (*Layer) RevokeNexus added in v0.54.0

func (c *Layer) RevokeNexus(belowNexus nexus.Nexus)

RevokeNexus is a revoked nexus.

func (*Layer) SetOnPing added in v0.54.0

func (c *Layer) SetOnPing(fn consumer.OnPingFn)

SetOnPing sets up the on ping function.

func (*Layer) SetupConsumerNexus added in v0.54.0

func (c *Layer) SetupConsumerNexus(belowNexus nexus.Nexus)

SetupConsumerNexus initializes consumer nexus and tie the onping event back to this layer.

Jump to

Keyboard shortcuts

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