connectors

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConnector

type BaseConnector struct {
	// contains filtered or unexported fields
}

BaseConnector implements basic connector functionality common to all connectors.

func (*BaseConnector) Activate

func (connector *BaseConnector) Activate(conf *config.Configuration, log *zerolog.Logger) error

Activate activates the connector.

func (*BaseConnector) UpdateMeshData

func (connector *BaseConnector) UpdateMeshData(data *meshdata.MeshData) error

UpdateMeshData updates the provided mesh data on the target side. The provided data only contains the data that should be updated, not the entire data set.

type Collection

type Collection struct {
	Connectors []Connector
}

Collection represents a collection of connectors.

func AvailableConnectors

func AvailableConnectors(conf *config.Configuration) (*Collection, error)

AvailableConnectors returns a collection of all connectors that are enabled in the configuration.

func (*Collection) ActivateAll

func (collection *Collection) ActivateAll(conf *config.Configuration, log *zerolog.Logger) error

ActivateAll activates all entities in the collection.

func (*Collection) Entities

func (collection *Collection) Entities() []entity.Entity

Entities gets the entities in this collection.

type Connector

type Connector interface {
	entity.Entity

	// RetrieveMeshData fetches new mesh data.
	RetrieveMeshData() (*meshdata.MeshData, error)
	// UpdateMeshData updates the provided mesh data on the target side. The provided data only contains the data that
	// should be updated, not the entire data set.
	UpdateMeshData(data *meshdata.MeshData) error
}

Connector is the interface that all connectors must implement.

type GOCDBConnector

type GOCDBConnector struct {
	BaseConnector
	// contains filtered or unexported fields
}

GOCDBConnector is used to read mesh data from a GOCDB instance.

func (*GOCDBConnector) Activate

func (connector *GOCDBConnector) Activate(conf *config.Configuration, log *zerolog.Logger) error

Activate activates the connector.

func (*GOCDBConnector) GetID

func (connector *GOCDBConnector) GetID() string

GetID returns the ID of the connector.

func (*GOCDBConnector) GetName

func (connector *GOCDBConnector) GetName() string

GetName returns the display name of the connector.

func (*GOCDBConnector) RetrieveMeshData

func (connector *GOCDBConnector) RetrieveMeshData() (*meshdata.MeshData, error)

RetrieveMeshData fetches new mesh data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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