Documentation
¶
Index ¶
- type Option
- type Server
- func (a *Server) CreateConnection(ctx context.Context, req *connect.Request[ingestionv1.CreateConnectionRequest]) (*connect.Response[ingestionv1.CreateConnectionResponse], error)
- func (a *Server) CreatePipeline(ctx context.Context, req *connect.Request[ingestionv1.CreatePipelineRequest]) (*connect.Response[ingestionv1.CreatePipelineResponse], error)
- func (a *Server) CreatePipelineNotifier(ctx context.Context, ...) (*connect.Response[ingestionv1.CreatePipelineNotifierResponse], error)
- func (a *Server) CreatePipelineSchedule(ctx context.Context, ...) (*connect.Response[ingestionv1.CreatePipelineScheduleResponse], error)
- func (a *Server) CreatePipelineVersion(ctx context.Context, ...) (*connect.Response[ingestionv1.CreatePipelineVersionResponse], error)
- func (a *Server) DeleteConnection(ctx context.Context, req *connect.Request[ingestionv1.DeleteConnectionRequest]) (*connect.Response[ingestionv1.DeleteConnectionResponse], error)
- func (a *Server) DeletePipeline(ctx context.Context, req *connect.Request[ingestionv1.DeletePipelineRequest]) (*connect.Response[ingestionv1.DeletePipelineResponse], error)
- func (a *Server) DeletePipelineNotifier(ctx context.Context, ...) (*connect.Response[ingestionv1.DeletePipelineNotifierResponse], error)
- func (a *Server) DiscoverResources(ctx context.Context, ...) (*connect.Response[ingestionv1.DiscoverResourcesResponse], error)
- func (a *Server) GetConnection(ctx context.Context, req *connect.Request[ingestionv1.GetConnectionRequest]) (*connect.Response[ingestionv1.GetConnectionResponse], error)
- func (a *Server) GetConnector(ctx context.Context, req *connect.Request[ingestionv1.GetConnectorRequest]) (*connect.Response[ingestionv1.GetConnectorResponse], error)
- func (a *Server) GetPipeline(ctx context.Context, req *connect.Request[ingestionv1.GetPipelineRequest]) (*connect.Response[ingestionv1.GetPipelineResponse], error)
- func (a *Server) GetPipelineVersion(ctx context.Context, ...) (*connect.Response[ingestionv1.GetPipelineVersionResponse], error)
- func (a *Server) GetResourceColumns(ctx context.Context, ...) (*connect.Response[ingestionv1.GetResourceColumnsResponse], error)
- func (a *Server) GetRun(ctx context.Context, req *connect.Request[ingestionv1.GetRunRequest]) (*connect.Response[ingestionv1.GetRunResponse], error)
- func (a *Server) ListConnections(ctx context.Context, req *connect.Request[ingestionv1.ListConnectionsRequest]) (*connect.Response[ingestionv1.ListConnectionsResponse], error)
- func (a *Server) ListConnectors(ctx context.Context, req *connect.Request[ingestionv1.ListConnectorsRequest]) (*connect.Response[ingestionv1.ListConnectorsResponse], error)
- func (a *Server) ListPipelineNotifiers(ctx context.Context, ...) (*connect.Response[ingestionv1.ListPipelineNotifiersResponse], error)
- func (a *Server) ListPipelineVersions(ctx context.Context, ...) (*connect.Response[ingestionv1.ListPipelineVersionsResponse], error)
- func (a *Server) ListPipelines(ctx context.Context, req *connect.Request[ingestionv1.ListPipelinesRequest]) (*connect.Response[ingestionv1.ListPipelinesResponse], error)
- func (a *Server) ListRuns(ctx context.Context, req *connect.Request[ingestionv1.ListRunsRequest]) (*connect.Response[ingestionv1.ListRunsResponse], error)
- func (a *Server) ListTransformFunctions(ctx context.Context, ...) (*connect.Response[ingestionv1.ListTransformFunctionsResponse], error)
- func (a *Server) Mount(mux *http.ServeMux)
- func (a *Server) QueryAggregate(ctx context.Context, req *connect.Request[metricsv1.QueryAggregateRequest]) (*connect.Response[metricsv1.QueryAggregateResponse], error)
- func (a *Server) QueryTimeseries(ctx context.Context, req *connect.Request[metricsv1.QueryTimeseriesRequest]) (*connect.Response[metricsv1.QueryTimeseriesResponse], error)
- func (a *Server) RunPipeline(ctx context.Context, req *connect.Request[ingestionv1.RunPipelineRequest]) (*connect.Response[ingestionv1.RunPipelineResponse], error)
- func (a *Server) SignalRun(ctx context.Context, req *connect.Request[ingestionv1.SignalRunRequest]) (*connect.Response[ingestionv1.SignalRunResponse], error)
- func (a *Server) TailRun(ctx context.Context, req *connect.Request[ingestionv1.TailRunRequest], ...) error
- func (a *Server) UpdateConnection(ctx context.Context, req *connect.Request[ingestionv1.UpdateConnectionRequest]) (*connect.Response[ingestionv1.UpdateConnectionResponse], error)
- func (a *Server) UpdatePipeline(ctx context.Context, req *connect.Request[ingestionv1.UpdatePipelineRequest]) (*connect.Response[ingestionv1.UpdatePipelineResponse], error)
- func (a *Server) UpdatePipelineNotifier(ctx context.Context, ...) (*connect.Response[ingestionv1.UpdatePipelineNotifierResponse], error)
- func (a *Server) UpdatePipelineSchedule(ctx context.Context, ...) (*connect.Response[ingestionv1.UpdatePipelineScheduleResponse], error)
- func (a *Server) ValidateConfig(ctx context.Context, req *connect.Request[ingestionv1.ValidateConfigRequest]) (*connect.Response[ingestionv1.ValidateConfigResponse], error)
- func (a *Server) ValidatePipeline(ctx context.Context, req *connect.Request[ingestionv1.ValidatePipelineRequest]) (*connect.Response[ingestionv1.ValidatePipelineResponse], error)
- func (a *Server) ValidateTransform(ctx context.Context, ...) (*connect.Response[ingestionv1.ValidateTransformResponse], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Server)
Option configures a Server.
func WithDefaultTenant ¶ added in v0.0.27
WithDefaultTenant sets the only tenant available when authentication is disabled. Authenticated requests always use the identity provider's tenant.
func WithIdentity ¶ added in v0.0.27
WithIdentity sets the authentication provider. Unset leaves the API unauthenticated and AuthService unimplemented apart from its config document, the same way an unset metrics store leaves MetricsService unimplemented.
func WithLogger ¶
WithLogger sets the structured logger used for API diagnostics.
func WithMetricsStore ¶
func WithMetricsStore(ms filament.MetricsStore) Option
WithMetricsStore sets the run metrics query backend. Unset leaves MetricsService unimplemented.
func WithSecrets ¶
WithSecrets sets the secrets provider used to resolve secret refs.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the ingestion Connect API over the worker, store, orchestrator, and bus.
func New ¶
func New(worker filament.Worker, store filament.DataStore, orch runSubmitter, bus eventbus.Bus, opts ...Option) *Server
New returns a Server wired to the given providers. worker answers every connector question; the server never holds a driver.
func (*Server) CreateConnection ¶
func (a *Server) CreateConnection(ctx context.Context, req *connect.Request[ingestionv1.CreateConnectionRequest]) (*connect.Response[ingestionv1.CreateConnectionResponse], error)
CreateConnection separates schema-declared secret fields from ordinary config, writes their values to the configured secret provider, and persists only opaque references alongside the non-secret config.
func (*Server) CreatePipeline ¶
func (a *Server) CreatePipeline(ctx context.Context, req *connect.Request[ingestionv1.CreatePipelineRequest]) (*connect.Response[ingestionv1.CreatePipelineResponse], error)
CreatePipeline stores a new pipeline and assigns its id.
func (*Server) CreatePipelineNotifier ¶ added in v0.3.1
func (a *Server) CreatePipelineNotifier(ctx context.Context, req *connect.Request[ingestionv1.CreatePipelineNotifierRequest]) (*connect.Response[ingestionv1.CreatePipelineNotifierResponse], error)
CreatePipelineNotifier stores secret fields and adds a rule.
func (*Server) CreatePipelineSchedule ¶
func (a *Server) CreatePipelineSchedule(ctx context.Context, req *connect.Request[ingestionv1.CreatePipelineScheduleRequest]) (*connect.Response[ingestionv1.CreatePipelineScheduleResponse], error)
CreatePipelineSchedule attaches the primary schedule to an existing pipeline.
func (*Server) CreatePipelineVersion ¶
func (a *Server) CreatePipelineVersion(ctx context.Context, req *connect.Request[ingestionv1.CreatePipelineVersionRequest]) (*connect.Response[ingestionv1.CreatePipelineVersionResponse], error)
CreatePipelineVersion appends an immutable graph version to a pipeline.
func (*Server) DeleteConnection ¶
func (a *Server) DeleteConnection(ctx context.Context, req *connect.Request[ingestionv1.DeleteConnectionRequest]) (*connect.Response[ingestionv1.DeleteConnectionResponse], error)
DeleteConnection removes the connection with the requested ID.
func (*Server) DeletePipeline ¶
func (a *Server) DeletePipeline(ctx context.Context, req *connect.Request[ingestionv1.DeletePipelineRequest]) (*connect.Response[ingestionv1.DeletePipelineResponse], error)
DeletePipeline removes the pipeline by id. The store's delete transaction also removes the pipeline's schedules and pending scheduled runs.
func (*Server) DeletePipelineNotifier ¶ added in v0.3.1
func (a *Server) DeletePipelineNotifier(ctx context.Context, req *connect.Request[ingestionv1.DeletePipelineNotifierRequest]) (*connect.Response[ingestionv1.DeletePipelineNotifierResponse], error)
DeletePipelineNotifier soft-deletes a rule, then removes the secrets it owned.
func (*Server) DiscoverResources ¶
func (a *Server) DiscoverResources(ctx context.Context, req *connect.Request[ingestionv1.DiscoverResourcesRequest]) (*connect.Response[ingestionv1.DiscoverResourcesResponse], error)
DiscoverResources configures the source and lists its selectable resources.
func (*Server) GetConnection ¶
func (a *Server) GetConnection(ctx context.Context, req *connect.Request[ingestionv1.GetConnectionRequest]) (*connect.Response[ingestionv1.GetConnectionResponse], error)
GetConnection returns the connection with the requested ID.
func (*Server) GetConnector ¶
func (a *Server) GetConnector(ctx context.Context, req *connect.Request[ingestionv1.GetConnectorRequest]) (*connect.Response[ingestionv1.GetConnectorResponse], error)
GetConnector returns the spec for one registered connector.
func (*Server) GetPipeline ¶
func (a *Server) GetPipeline(ctx context.Context, req *connect.Request[ingestionv1.GetPipelineRequest]) (*connect.Response[ingestionv1.GetPipelineResponse], error)
GetPipeline returns a pipeline with the requested related resources.
func (*Server) GetPipelineVersion ¶
func (a *Server) GetPipelineVersion(ctx context.Context, req *connect.Request[ingestionv1.GetPipelineVersionRequest]) (*connect.Response[ingestionv1.GetPipelineVersionResponse], error)
GetPipelineVersion returns a specific immutable pipeline graph version.
func (*Server) GetResourceColumns ¶
func (a *Server) GetResourceColumns(ctx context.Context, req *connect.Request[ingestionv1.GetResourceColumnsRequest]) (*connect.Response[ingestionv1.GetResourceColumnsResponse], error)
GetResourceColumns configures one source and returns schemas for every requested resource, avoiding one connector pool per resource in the editor.
func (*Server) GetRun ¶
func (a *Server) GetRun(ctx context.Context, req *connect.Request[ingestionv1.GetRunRequest]) (*connect.Response[ingestionv1.GetRunResponse], error)
GetRun returns the run's state and per-resource progress.
func (*Server) ListConnections ¶
func (a *Server) ListConnections(ctx context.Context, req *connect.Request[ingestionv1.ListConnectionsRequest]) (*connect.Response[ingestionv1.ListConnectionsResponse], error)
ListConnections returns connections matching the request's tenant and kind filter.
func (*Server) ListConnectors ¶
func (a *Server) ListConnectors(ctx context.Context, req *connect.Request[ingestionv1.ListConnectorsRequest]) (*connect.Response[ingestionv1.ListConnectorsResponse], error)
ListConnectors returns the registered source and sink specs, optionally filtered by kind.
func (*Server) ListPipelineNotifiers ¶ added in v0.3.1
func (a *Server) ListPipelineNotifiers(ctx context.Context, req *connect.Request[ingestionv1.ListPipelineNotifiersRequest]) (*connect.Response[ingestionv1.ListPipelineNotifiersResponse], error)
ListPipelineNotifiers lists live rules, including disabled ones.
func (*Server) ListPipelineVersions ¶
func (a *Server) ListPipelineVersions(ctx context.Context, req *connect.Request[ingestionv1.ListPipelineVersionsRequest]) (*connect.Response[ingestionv1.ListPipelineVersionsResponse], error)
ListPipelineVersions returns all of a pipeline's graph versions, newest first.
func (*Server) ListPipelines ¶
func (a *Server) ListPipelines(ctx context.Context, req *connect.Request[ingestionv1.ListPipelinesRequest]) (*connect.Response[ingestionv1.ListPipelinesResponse], error)
ListPipelines returns pipelines, optionally filtered by tenant.
func (*Server) ListRuns ¶
func (a *Server) ListRuns(ctx context.Context, req *connect.Request[ingestionv1.ListRunsRequest]) (*connect.Response[ingestionv1.ListRunsResponse], error)
ListRuns returns runs matching the request's tenant, pipeline, version, statuses, and started_at window.
func (*Server) ListTransformFunctions ¶ added in v0.21.0
func (a *Server) ListTransformFunctions(ctx context.Context, req *connect.Request[ingestionv1.ListTransformFunctionsRequest]) (*connect.Response[ingestionv1.ListTransformFunctionsResponse], error)
ListTransformFunctions serves the transform catalog, narrowed to the functions that accept a column of the requested logical type when one is given. Types cross the wire as the logical type names resource columns use.
func (*Server) Mount ¶
Mount registers the Connect handlers on mux. AuthService mounts whether or not a provider is configured so the UI always has a config document to read; with a provider, one interceptor authenticates every procedure that is not part of the public session flow.
func (*Server) QueryAggregate ¶
func (a *Server) QueryAggregate(ctx context.Context, req *connect.Request[metricsv1.QueryAggregateRequest]) (*connect.Response[metricsv1.QueryAggregateResponse], error)
QueryAggregate returns one row per group_by value (a single "" key when group_by is unset) over [since_ms, until_ms).
func (*Server) QueryTimeseries ¶
func (a *Server) QueryTimeseries(ctx context.Context, req *connect.Request[metricsv1.QueryTimeseriesRequest]) (*connect.Response[metricsv1.QueryTimeseriesResponse], error)
QueryTimeseries returns one dense, zero-filled, ascending series per group_by value (a single "" series when group_by is unset) bucketed at the requested granularity over [since_ms, until_ms).
func (*Server) RunPipeline ¶
func (a *Server) RunPipeline(ctx context.Context, req *connect.Request[ingestionv1.RunPipelineRequest]) (*connect.Response[ingestionv1.RunPipelineResponse], error)
RunPipeline groups the pipeline's edges into per-route runs and submits each to the orchestrator.
func (*Server) SignalRun ¶
func (a *Server) SignalRun(ctx context.Context, req *connect.Request[ingestionv1.SignalRunRequest]) (*connect.Response[ingestionv1.SignalRunResponse], error)
SignalRun validates transport concerns and delegates lifecycle policy to the shared run command layer.
func (*Server) TailRun ¶
func (a *Server) TailRun(ctx context.Context, req *connect.Request[ingestionv1.TailRunRequest], stream *connect.ServerStream[ingestionv1.TailRunResponse]) error
TailRun streams run progress facts to the client, optionally replaying events synthesized from the current snapshot before live facts.
func (*Server) UpdateConnection ¶
func (a *Server) UpdateConnection(ctx context.Context, req *connect.Request[ingestionv1.UpdateConnectionRequest]) (*connect.Response[ingestionv1.UpdateConnectionResponse], error)
UpdateConnection applies changes to an existing connection, enforcing optimistic versioning.
func (*Server) UpdatePipeline ¶
func (a *Server) UpdatePipeline(ctx context.Context, req *connect.Request[ingestionv1.UpdatePipelineRequest]) (*connect.Response[ingestionv1.UpdatePipelineResponse], error)
UpdatePipeline changes mutable pipeline metadata. Graph changes are stored as immutable versions through CreatePipelineVersion.
func (*Server) UpdatePipelineNotifier ¶ added in v0.3.1
func (a *Server) UpdatePipelineNotifier(ctx context.Context, req *connect.Request[ingestionv1.UpdatePipelineNotifierRequest]) (*connect.Response[ingestionv1.UpdatePipelineNotifierResponse], error)
UpdatePipelineNotifier replaces a rule's settings. The last write wins.
func (*Server) UpdatePipelineSchedule ¶
func (a *Server) UpdatePipelineSchedule(ctx context.Context, req *connect.Request[ingestionv1.UpdatePipelineScheduleRequest]) (*connect.Response[ingestionv1.UpdatePipelineScheduleResponse], error)
UpdatePipelineSchedule replaces the writable configuration of a schedule.
func (*Server) ValidateConfig ¶
func (a *Server) ValidateConfig(ctx context.Context, req *connect.Request[ingestionv1.ValidateConfigRequest]) (*connect.Response[ingestionv1.ValidateConfigResponse], error)
ValidateConfig checks a connector config against its schema and, when the connector can probe connectivity, performs one live request with it so a bad credential is reported here rather than on the first run.
func (*Server) ValidatePipeline ¶
func (a *Server) ValidatePipeline(ctx context.Context, req *connect.Request[ingestionv1.ValidatePipelineRequest]) (*connect.Response[ingestionv1.ValidatePipelineResponse], error)
ValidatePipeline checks every edge of a graph: the per-resource read and write modes the connector pair supports, their selected combination, and any cursor or primary-key requirements.
func (*Server) ValidateTransform ¶ added in v0.21.0
func (a *Server) ValidateTransform(ctx context.Context, req *connect.Request[ingestionv1.ValidateTransformRequest]) (*connect.Response[ingestionv1.ValidateTransformResponse], error)
ValidateTransform parses and compiles a transform against one resource's schema, read from the source connection, exactly as a run would. Grammar and compile problems come back as issues addressed by path. The response also carries the columns the steps that compiled produce and the type of every sub-expression that compiled, on success and on failure alike.