api

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectorAPIv1

type ConnectorAPIv1 struct {
	apiv1.UnimplementedConnectorServiceServer
	// contains filtered or unexported fields
}

func NewConnectorAPIv1

func NewConnectorAPIv1(cs ConnectorOrchestrator) *ConnectorAPIv1

func (*ConnectorAPIv1) CreateConnector

CreateConnector handles a CreateConnectorRequest, persists it to the Storage layer, and then returns the created connector with its assigned ID

func (*ConnectorAPIv1) DeleteConnector

func (*ConnectorAPIv1) GetConnector

GetConnector returns a single Connector proto response or an error.

func (*ConnectorAPIv1) InspectConnector added in v0.4.0

func (*ConnectorAPIv1) ListConnectors

func (*ConnectorAPIv1) Register

func (c *ConnectorAPIv1) Register(srv *grpc.Server)

func (*ConnectorAPIv1) UpdateConnector

func (*ConnectorAPIv1) ValidateConnector added in v0.2.1

ValidateConnector validates whether the connector configurations are valid or not returns an empty response if valid, an error otherwise

type ConnectorOrchestrator

type ConnectorOrchestrator interface {
	Create(ctx context.Context, t connector.Type, plugin string, pipelineID string, config connector.Config) (*connector.Instance, error)
	List(ctx context.Context) map[string]*connector.Instance
	Get(ctx context.Context, id string) (*connector.Instance, error)
	Delete(ctx context.Context, id string) error
	Update(ctx context.Context, id string, config connector.Config) (*connector.Instance, error)
	Validate(ctx context.Context, t connector.Type, plugin string, config connector.Config) error
	Inspect(ctx context.Context, id string) (*inspector.Session, error)
}

type HealthChecker

type HealthChecker struct {
	grpc_health_v1.UnimplementedHealthServer
}

func NewHealthChecker

func NewHealthChecker() *HealthChecker

func (*HealthChecker) Watch

type Information

type Information struct {
	apiv1.UnimplementedInformationServiceServer
	// contains filtered or unexported fields
}

func NewInformation

func NewInformation(version string) *Information

func (*Information) GetInfo

func (*Information) Register

func (i *Information) Register(srv *grpc.Server)

type PipelineAPIv1

type PipelineAPIv1 struct {
	apiv1.UnimplementedPipelineServiceServer
	// contains filtered or unexported fields
}

func NewPipelineAPIv1

func NewPipelineAPIv1(ps PipelineOrchestrator) *PipelineAPIv1

NewPipelineAPIv1 returns a new pipeline API server.

func (*PipelineAPIv1) CreatePipeline

CreatePipeline handles a CreatePipelineRequest, persists it to the Storage layer, and then returns the created pipeline with its assigned ID

func (*PipelineAPIv1) DeletePipeline

func (*PipelineAPIv1) ExportPipeline

func (*PipelineAPIv1) GetDLQ added in v0.5.0

func (*PipelineAPIv1) GetPipeline

GetPipeline returns a single Pipeline proto response or an error.

func (*PipelineAPIv1) ImportPipeline

func (*PipelineAPIv1) ListPipelines

ListPipelines returns a list of all pipelines.

func (*PipelineAPIv1) Register

func (p *PipelineAPIv1) Register(srv *grpc.Server)

Register registers the service in the server.

func (*PipelineAPIv1) StartPipeline

func (*PipelineAPIv1) StopPipeline

func (*PipelineAPIv1) UpdateDLQ added in v0.5.0

func (*PipelineAPIv1) UpdatePipeline

type PipelineOrchestrator

type PipelineOrchestrator interface {
	// Start runs a pipeline.
	Start(ctx context.Context, id string) error
	// Stop stops a pipeline.
	Stop(ctx context.Context, id string) error
	// List will return all pipelines stored in it.
	List(ctx context.Context) map[string]*pipeline.Instance
	// Get will return a single Pipeline or an error if it doesn't exist.
	Get(ctx context.Context, id string) (*pipeline.Instance, error)
	// Create will make a new Pipeline.
	Create(ctx context.Context, cfg pipeline.Config) (*pipeline.Instance, error)
	// Update will update a Pipeline's config.
	Update(ctx context.Context, id string, cfg pipeline.Config) (*pipeline.Instance, error)
	// UpdateDLQ will update a Pipeline's dead-letter-queue.
	UpdateDLQ(ctx context.Context, id string, dlq pipeline.DLQ) (*pipeline.Instance, error)
	// Delete removes a pipeline and all associated connectors and plugins.
	Delete(ctx context.Context, id string) error
}

PipelineOrchestrator defines a CRUD interface that manages the Pipeline resource.

type PluginAPIv1 added in v0.2.0

type PluginAPIv1 struct {
	apiv1.UnimplementedPluginServiceServer
	// contains filtered or unexported fields
}

func NewPluginAPIv1 added in v0.2.0

func NewPluginAPIv1(ps PluginOrchestrator) *PluginAPIv1

func (*PluginAPIv1) ListPlugins added in v0.2.0

func (*PluginAPIv1) Register added in v0.2.0

func (p *PluginAPIv1) Register(srv *grpc.Server)

type PluginOrchestrator added in v0.2.0

type PluginOrchestrator interface {
	// List will return all plugins' specs.
	List(ctx context.Context) (map[string]plugin.Specification, error)
}

PluginOrchestrator defines a CRUD interface that manages the Plugin resource.

type ProcessorAPIv1

type ProcessorAPIv1 struct {
	apiv1.UnimplementedProcessorServiceServer
	// contains filtered or unexported fields
}

func NewProcessorAPIv1

func NewProcessorAPIv1(ps ProcessorOrchestrator) *ProcessorAPIv1

NewProcessorAPIv1 returns a new processor API server.

func (*ProcessorAPIv1) CreateProcessor

CreateProcessor handles a CreateProcessorRequest, persists it to the Storage layer, and then returns the created processor with its assigned ID

func (*ProcessorAPIv1) DeleteProcessor

func (*ProcessorAPIv1) GetProcessor

GetProcessor returns a single Interface proto response or an error.

func (*ProcessorAPIv1) InspectProcessorIn added in v0.5.0

func (*ProcessorAPIv1) InspectProcessorOut added in v0.5.0

func (*ProcessorAPIv1) ListProcessors

func (*ProcessorAPIv1) Register

func (p *ProcessorAPIv1) Register(srv *grpc.Server)

Register registers the service in the server.

func (*ProcessorAPIv1) UpdateProcessor

type ProcessorOrchestrator

type ProcessorOrchestrator interface {
	List(ctx context.Context) map[string]*processor.Instance
	// Get will return a single Interface or an error if it doesn't exist.
	Get(ctx context.Context, id string) (*processor.Instance, error)
	// Create will make a new Interface.
	Create(ctx context.Context, procType string, parent processor.Parent, cfg processor.Config) (*processor.Instance, error)
	// Update will update a Interface's config.
	Update(ctx context.Context, id string, cfg processor.Config) (*processor.Instance, error)
	// Delete removes a processor
	Delete(ctx context.Context, id string) error
	// InspectIn starts an inspector session for the records coming into the processor with given ID.
	InspectIn(ctx context.Context, id string) (*inspector.Session, error)
	// InspectOut starts an inspector session for the records going out of the processor with given ID.
	InspectOut(ctx context.Context, id string) (*inspector.Session, error)
}

ProcessorOrchestrator defines a CRUD interface that manages the Interface resource.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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