subscription

package
v0.7.11 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	io.Closer

	// Add adds a subscription
	Add(ctx context.Context, subscription *subapi.Subscription) error

	// Remove removes a subscription
	Remove(ctx context.Context, subscription *subapi.Subscription) error

	// Get returns a subscription based on a given subscription ID
	Get(ctx context.Context, id subapi.ID) (*subapi.Subscription, error)

	// List returns the list of existing subscriptions
	List(ctx context.Context) ([]subapi.Subscription, error)

	// Watch watches the subscription changes
	Watch(ctx context.Context, ch chan<- subapi.Event) error
}

Client is an E2 subscription service client interface

func NewClient

func NewClient(conn *grpc.ClientConn) Client

NewClient creates a new subscribe service client

type Context added in v0.6.10

type Context interface {
	io.Closer

	// ID returns the subscription identifier
	ID() subapi.ID

	// Err returns the subscription error channel
	Err() <-chan error
}

Context is a subscription context

Jump to

Keyboard shortcuts

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