consumer

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventAdapter

type EventAdapter interface {
	GetInterestedEvents() ([]*peer.Interest, error)
	Recv(msg *peer.Event) (bool, error)
	Disconnected(err error)
}

type EventsClient

type EventsClient struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewEventsClient

func NewEventsClient(peerAddress string, regTimeout time.Duration, adapter EventAdapter) (*EventsClient, error)

func (*EventsClient) Recv

func (ec *EventsClient) Recv() (*ehpb.Event, error)

func (*EventsClient) RegisterAsync

func (ec *EventsClient) RegisterAsync(config *RegistrationConfig) error

func (*EventsClient) Start

func (ec *EventsClient) Start() error

func (*EventsClient) Stop

func (ec *EventsClient) Stop() error

func (*EventsClient) UnregisterAsync

func (ec *EventsClient) UnregisterAsync(ies []*ehpb.Interest) error

type RegistrationConfig

type RegistrationConfig struct {
	InterestedEvents []*ehpb.Interest
	Timestamp        *timestamp.Timestamp
	TlsCert          *x509.Certificate
}

Jump to

Keyboard shortcuts

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