connectors

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 18 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.

type LocalFileConnector added in v1.5.0

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

LocalFileConnector is used to read sites from a local file.

func (*LocalFileConnector) Activate added in v1.5.0

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

Activate activates the connector.

func (*LocalFileConnector) GetID added in v1.5.0

func (connector *LocalFileConnector) GetID() string

GetID returns the ID of the connector.

func (*LocalFileConnector) GetName added in v1.5.0

func (connector *LocalFileConnector) GetName() string

GetName returns the display name of the connector.

func (*LocalFileConnector) RetrieveMeshData added in v1.5.0

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

RetrieveMeshData fetches new mesh data.

func (*LocalFileConnector) UpdateMeshData added in v1.5.0

func (connector *LocalFileConnector) UpdateMeshData(updatedData *meshdata.MeshData) error

UpdateMeshData updates the provided mesh data on the target side.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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