topo

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: Apache-2.0 Imports: 9 Imported by: 23

Documentation

Overview

Package topo contains facilities for RIC applications to monitor topology for changes

Package topo contains facilities for RIC applications to monitor topology for changes

Index

Constants

This section is empty.

Variables

View Source
var DefaultServiceConfig = ServiceConfig{
	Host:     defaultServiceHost,
	Port:     defaultServicePort,
	Insecure: true,
}

Current topology service configuration; starts with reasonable defaults

Functions

This section is empty.

Types

type Client

type Client interface {
	// Watch provides a simple facility for the application to watch for changes in the topology
	Watch(ctx context.Context, ch chan<- topoapi.Event, options ...FilterOption) error
}

Client is a topo client

func NewClient

func NewClient(config ServiceConfig) (Client, error)

NewClient creates a new E2 client

type FilterOption

type FilterOption interface {
	// contains filtered or unexported methods
}

FilterOptions describes the criteria for the type of topology entities and events that the application should be notified about

func WithEventFilter

func WithEventFilter(t ...topoapi.EventType) FilterOption

WithEventFilter matches events of the specified event type

func WithKindFilter

func WithKindFilter(ids ...topoapi.ID) FilterOption

WithKindFilter matches events for objects of the specified kind

func WithTypeFilter

func WithTypeFilter(t ...topoapi.Object_Type) FilterOption

WithTypeFilter matches events for objects of the specified type

type ServiceConfig

type ServiceConfig struct {
	// Host is the service host
	Host string
	// Port is the service port
	Port int

	// CAPath is path to certificate authority key
	CAPath string
	// KeyPath is path to certificate cert key
	KeyPath string
	// CertPath is path to certificate server certificate
	CertPath string
	// Insecure indicates insecure connection
	Insecure bool
}

ServiceConfig is a topo service configuration

func (ServiceConfig) GetHost

func (c ServiceConfig) GetHost() string

GetHost gets the service host

func (ServiceConfig) GetPort

func (c ServiceConfig) GetPort() int

GetPort gets the service port

Jump to

Keyboard shortcuts

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