mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
* Remove MDS and replace it with Controller This commit removes the MDS layer (and package) and shifts Controller package into its place. * add pprof/fgprof to serverless http router --------- Co-authored-by: Matthew Jaffee <jaffee@pilosa.com>
40 lines
1.1 KiB
Go
40 lines
1.1 KiB
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/featurebasedb/featurebase/v3/dax"
|
|
)
|
|
|
|
type Director interface {
|
|
SendDirective(ctx context.Context, dir *dax.Directive) error
|
|
SendSnapshotShardDataRequest(ctx context.Context, req *dax.SnapshotShardDataRequest) error
|
|
SendSnapshotTableKeysRequest(ctx context.Context, req *dax.SnapshotTableKeysRequest) error
|
|
SendSnapshotFieldKeysRequest(ctx context.Context, req *dax.SnapshotFieldKeysRequest) error
|
|
}
|
|
|
|
// Ensure type implements interface.
|
|
var _ Director = &NopDirector{}
|
|
|
|
// NopDirector is a no-op implementation of the Director interface.
|
|
type NopDirector struct{}
|
|
|
|
func NewNopDirector() *NopDirector {
|
|
return &NopDirector{}
|
|
}
|
|
|
|
func (d *NopDirector) SendDirective(ctx context.Context, dir *dax.Directive) error {
|
|
return nil
|
|
}
|
|
|
|
func (d *NopDirector) SendSnapshotShardDataRequest(ctx context.Context, req *dax.SnapshotShardDataRequest) error {
|
|
return nil
|
|
}
|
|
|
|
func (d *NopDirector) SendSnapshotTableKeysRequest(ctx context.Context, req *dax.SnapshotTableKeysRequest) error {
|
|
return nil
|
|
}
|
|
|
|
func (d *NopDirector) SendSnapshotFieldKeysRequest(ctx context.Context, req *dax.SnapshotFieldKeysRequest) error {
|
|
return nil
|
|
}
|