service

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PermV2DeviceTopic              = "devices"
	ExportInstancePermissionsTopic = "export-instances"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	CreateInstance(instance *lib.Instance, dataFields string, tagFields string) (serviceId string, err error)
	DeleteInstance(instance *lib.Instance) (err error)
}

type ExportWorkerKafkaApi

type ExportWorkerKafkaApi interface {
	CreateFilterTopic(topic string, checkExists bool) error
	InitFilterTopics(serving *Serving) error
}

type ImportDeployService

type ImportDeployService interface {
	UserHasImportAccess(id string, authorization string) (bool, error)
}

type Influx

type Influx interface {
	ForceDeleteMeasurement(id string, userId string, instance lib.Instance) (errs []error)
}

type InfluxImpl

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

func NewInflux

func NewInflux(cfg config.InfluxConfig, ctx context.Context, wg *sync.WaitGroup) *InfluxImpl

func (*InfluxImpl) ForceDeleteMeasurement

func (i *InfluxImpl) ForceDeleteMeasurement(id string, userId string, instance lib.Instance) (errs []error)

type PipelineApiService

type PipelineApiService interface {
	UserHasPipelineAccess(id string, authorization string) (bool, error)
}

type Serving

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

func NewServing

func NewServing(driver Driver,
	influx Influx,
	pipelineService PipelineApiService,
	importDeployService ImportDeployService,
	exportDatabaseIdPrefix string,
	permissionsV2 permV2Client.Client,
	cleanupChron string,
	cleanupRecheckWait time.Duration) (*Serving, error)

func (*Serving) CreateExportDatabase

func (f *Serving) CreateExportDatabase(id string, req lib.ExportDatabaseRequest, userId string) (database lib.ExportDatabase, errs []error)

func (*Serving) CreateFromInstance

func (f *Serving) CreateFromInstance(instance *lib.Instance) (err error)

func (*Serving) CreateInstance

func (f *Serving) CreateInstance(req lib.ServingRequest, userId string, token string) (instance lib.Instance, err error)

func (*Serving) DeleteExportDatabase

func (f *Serving) DeleteExportDatabase(id string, userId string) (errs []error)

func (*Serving) DeleteInstanceForUser

func (f *Serving) DeleteInstanceForUser(id string, userId string, token string) (deleted bool, errors []error)

func (*Serving) DeleteInstanceWithPermHandling

func (f *Serving) DeleteInstanceWithPermHandling(id string, userId string, admin bool, token string) (deleted bool, errors []error)

func (*Serving) DeleteInstancesForUser

func (f *Serving) DeleteInstancesForUser(ids []string, userId string, token string) (deleted []string, errors []error)

func (*Serving) ExportInstanceCleanup

func (f *Serving) ExportInstanceCleanup(recheckWait time.Duration) error

func (*Serving) GetExportDatabase

func (f *Serving) GetExportDatabase(id string, userId string) (database lib.ExportDatabase, errs []error)

func (*Serving) GetExportDatabases

func (f *Serving) GetExportDatabases(userId string, args map[string][]string) (databases []lib.ExportDatabase, errs []error)

func (*Serving) GetInstance

func (f *Serving) GetInstance(id string, userId string, token string, admin bool) (instance lib.Instance, errors []error)

func (*Serving) GetInstances

func (f *Serving) GetInstances(userId string, args map[string][]string, admin bool, token string) (instances lib.Instances, total int64, errors []error)

func (*Serving) GetInstancesForUser

func (f *Serving) GetInstancesForUser(userId string, args map[string][]string, token string) (instances lib.Instances, count int64, errors []error)

func (*Serving) UpdateExportDatabase

func (f *Serving) UpdateExportDatabase(id string, req lib.ExportDatabaseRequest, userId string) (database lib.ExportDatabase, errs []error)

func (*Serving) UpdateInstance

func (f *Serving) UpdateInstance(id string, userId string, request lib.ServingRequest, token string) (instance lib.Instance, errors []error)

Directories

Path Synopsis
tests

Jump to

Keyboard shortcuts

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