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 ¶
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