subscription

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: Apache-2.0 Imports: 9 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 Payload added in v0.6.2

type Payload struct {
	Value interface{}
}

Payload is an E2 subscription payload

func (*Payload) GetProtoValue added in v0.6.2

func (p *Payload) GetProtoValue() ([]byte, error)

GetProtoValue

type Subscription added in v0.6.2

type Subscription struct {
	// EncodingType payload encoding type
	EncodingType encoding.Type
	// NodeID is the E2 node identifier
	NodeID node.ID
	// ServiceModel is the service model
	ServiceModel sm.ServiceModel
	// Payload is the subscription payload
	Payload Payload
}

Subscription is an E2 subscription

Jump to

Keyboard shortcuts

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