controller

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func New

func New(conf configuration.Config, processSync ProcessSync, deviceRepoFactory DeviceRepoFactory) (*Controller, error)

func (*Controller) CreateDeployment

func (this *Controller) CreateDeployment(token string, hubId string, deployment deploymentmodel.Deployment, source string, optionals map[string]bool) (result deploymentmodel.Deployment, err error, code int)

func (*Controller) GetProcessModel

func (this *Controller) GetProcessModel(token string, id string) (result processmodel.ProcessModel, err error, errCode int)

func (*Controller) PrepareDeployment

func (this *Controller) PrepareDeployment(token string, hubId string, xml string, svg string) (result deploymentmodel.Deployment, err error, code int)

func (*Controller) RemoveDeployment

func (this *Controller) RemoveDeployment(token auth.Token, hubId string, deploymentId string) (err error, code int)

func (*Controller) ReuseCloudDeployment

func (this *Controller) ReuseCloudDeployment() *ctrl.Ctrl

func (*Controller) ReuseCloudDeploymentWithNewDeviceRepo

func (this *Controller) ReuseCloudDeploymentWithNewDeviceRepo(hubId string) *ctrl.Ctrl

func (*Controller) ReuseCloudDeploymentWithProcessSync

func (this *Controller) ReuseCloudDeploymentWithProcessSync(token string, hubId string) *ctrl.Ctrl

func (*Controller) SetExecutableFlag

func (this *Controller) SetExecutableFlag(deployment *deploymentmodel.Deployment)

func (*Controller) StartDeployment

func (this *Controller) StartDeployment(token auth.Token, hubId string, deploymentId string, inputs url.Values) (err error, code int)

type DeviceRepoFactory

type DeviceRepoFactory func(config configuration.Config, reuse interfaces.Devices, hubId string) interfaces.Devices

type ImportsMock

type ImportsMock struct{}

func (ImportsMock) CheckAccess

func (this ImportsMock) CheckAccess(token auth.Token, ids []string, alsoCheckTypes bool) (bool, error)

type ProcessRepo

type ProcessRepo interface {
	GetProcessModel(token string, id string) (result processmodel.ProcessModel, err error, errCode int)
}

type ProcessSync

type ProcessSync interface {
	Deploy(token string, hubId string, deployment deploymentmodel.Deployment) error
	Remove(token string, hubId string, id string) (err error, code int)
	Metadata(token string, hubId string, deploymentId string) (result []model.DeploymentMetadata, err error, code int)
	Start(token string, hubId string, deploymentId string, inputs url.Values) (error, int)
}

type ProducerReplacement

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

reroutes deployment requests to github.com/SENERGY-Platform/process-sync

func (*ProducerReplacement) Produce

func (this *ProducerReplacement) Produce(topic string, message []byte) error

type SourcingReplacement

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

mocks sourcing interface to reuse github.com/SENERGY-Platform/process-deployment/lib/ctrl without connecting to kafka

func (*SourcingReplacement) NewConsumer

func (this *SourcingReplacement) NewConsumer(ctx context.Context, config config.Config, topic string, listener func(delivery []byte) error) error

func (*SourcingReplacement) NewProducer

func (this *SourcingReplacement) NewProducer(ctx context.Context, config config.Config, topic string) (interfaces.Producer, error)

Jump to

Keyboard shortcuts

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