api

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker added in v0.5.1

type Checker interface {
	Check(ctx context.Context) error
}

type ConnectorAPIv1

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

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) ListConnectorPlugins added in v0.9.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, plugin 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 ConnectorPluginOrchestrator added in v0.9.0

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

type HealthServer added in v0.5.1

type HealthServer struct {
	grpc_health_v1.UnimplementedHealthServer
	// contains filtered or unexported fields
}

HealthServer implements the gRPC health service. Using the HealthServer, it's possible to check the gRPC server's overall health, but also the health of the individual gRPC services. For more information, see: https://github.com/grpc/grpc/blob/master/doc/health-checking.md

func NewHealthServer added in v0.5.1

func NewHealthServer(checkers map[string]Checker, log log.CtxLogger) *HealthServer

func (*HealthServer) Check added in v0.5.1

func (*HealthServer) Watch added in v0.5.1

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) GetDLQ added in v0.5.0

func (*PipelineAPIv1) GetPipeline

GetPipeline returns a single Pipeline proto response or an error.

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, force bool) 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(
	cpo ConnectorPluginOrchestrator,
) *PluginAPIv1

func (*PluginAPIv1) ListPlugins deprecated added in v0.2.0

Deprecated: this is here for backwards compatibility with the old plugin API. Use ListConnectorPlugins instead.

func (*PluginAPIv1) Register added in v0.2.0

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

type ProcessorAPIv1

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

func NewProcessorAPIv1

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) ListProcessorPlugins added in v0.9.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 processor or an error if it doesn't exist.
	Get(ctx context.Context, id string) (*processor.Instance, error)
	// Create will make a new processor.
	Create(ctx context.Context, procType string, parent processor.Parent, cfg processor.Config, condition string) (*processor.Instance, error)
	// Update will update a processor's config.
	Update(ctx context.Context, id string, plugin 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 processor resource.

type ProcessorPluginOrchestrator added in v0.9.0

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

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