Documentation ¶
Index ¶
- Constants
- Variables
- type ExternalServer
- func (s *ExternalServer) AppRegister(ctx context.Context, req *protos.AppRegistrationRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) AppRegisterReject(ctx context.Context, req *protos.AppRegisterRejectRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) AppRegistrationStatus(_ context.Context, req *protos.AppRegistrationStatusRequest) (*protos.AppRegistrationStatusResponse, error)
- func (s *ExternalServer) AppVerifyRegistration(_ context.Context, req *protos.AppVerifyRegistrationRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) AttachNotification(ctx context.Context, _ *protos.AttachNotificationRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) CreateAudience(ctx context.Context, req *protos.CreateAudienceRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) CreateNotification(ctx context.Context, req *protos.CreateNotificationRequest) (*protos.CreateNotificationResponse, error)
- func (s *ExternalServer) CreatePipeline(ctx context.Context, req *protos.CreatePipelineRequest) (*protos.CreatePipelineResponse, error)
- func (s *ExternalServer) CreateWasm(ctx context.Context, req *protos.CreateWasmRequest) (*protos.CreateWasmResponse, error)
- func (s *ExternalServer) DeleteAudience(ctx context.Context, req *protos.DeleteAudienceRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) DeleteNotification(ctx context.Context, req *protos.DeleteNotificationRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) DeletePipeline(ctx context.Context, req *protos.DeletePipelineRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) DeleteService(ctx context.Context, req *protos.DeleteServiceRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) DeleteWasm(ctx context.Context, req *protos.DeleteWasmRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) DetachNotification(ctx context.Context, _ *protos.DetachNotificationRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) GetAll(ctx context.Context, req *protos.GetAllRequest) (*protos.GetAllResponse, error)
- func (s *ExternalServer) GetAllStream(req *protos.GetAllRequest, server protos.External_GetAllStreamServer) error
- func (s *ExternalServer) GetAllWasm(ctx context.Context, req *protos.GetAllWasmRequest) (*protos.GetAllWasmResponse, error)
- func (s *ExternalServer) GetAudienceRates(_ *protos.GetAudienceRatesRequest, ...) error
- func (s *ExternalServer) GetConfig(ctx context.Context, _ *protos.GetConfigRequest) (*protos.GetConfigResponse, error)
- func (s *ExternalServer) GetMetrics(_ *protos.GetMetricsRequest, server protos.External_GetMetricsServer) error
- func (s *ExternalServer) GetNotification(ctx context.Context, req *protos.GetNotificationRequest) (*protos.GetNotificationResponse, error)
- func (s *ExternalServer) GetNotifications(ctx context.Context, req *protos.GetNotificationsRequest) (*protos.GetNotificationsResponse, error)
- func (s *ExternalServer) GetPipeline(ctx context.Context, req *protos.GetPipelineRequest) (*protos.GetPipelineResponse, error)
- func (s *ExternalServer) GetPipelines(ctx context.Context, req *protos.GetPipelinesRequest) (*protos.GetPipelinesResponse, error)
- func (s *ExternalServer) GetSchema(ctx context.Context, req *protos.GetSchemaRequest) (*protos.GetSchemaResponse, error)
- func (s *ExternalServer) GetWasm(ctx context.Context, req *protos.GetWasmRequest) (*protos.GetWasmResponse, error)
- func (s *ExternalServer) PausePipeline(ctx context.Context, req *protos.PausePipelineRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) PauseTail(ctx context.Context, req *protos.PauseTailRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) ResumePipeline(ctx context.Context, req *protos.ResumePipelineRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) ResumeTail(ctx context.Context, req *protos.ResumeTailRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) SetPipelines(ctx context.Context, req *protos.SetPipelinesRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) Tail(req *protos.TailRequest, server protos.External_TailServer) error
- func (s *ExternalServer) Test(_ context.Context, req *protos.TestRequest) (*protos.TestResponse, error)
- func (s *ExternalServer) UpdateNotification(ctx context.Context, req *protos.UpdateNotificationRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) UpdatePipeline(ctx context.Context, req *protos.UpdatePipelineRequest) (*protos.StandardResponse, error)
- func (s *ExternalServer) UpdateWasm(ctx context.Context, req *protos.UpdateWasmRequest) (*protos.StandardResponse, error)
- type GRPCAPI
- func (g *GRPCAPI) AuthServerStreamInterceptor(srv interface{}, stream grpc.ServerStream, _ *grpc.StreamServerInfo, ...) error
- func (g *GRPCAPI) AuthServerUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, ...) (interface{}, error)
- func (g *GRPCAPI) RequestIDServerStreamInterceptor(srv interface{}, stream grpc.ServerStream, _ *grpc.StreamServerInfo, ...) error
- func (g *GRPCAPI) RequestIDServerUnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func (g *GRPCAPI) Run() error
- func (g *GRPCAPI) TelemetryStreamInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func (g *GRPCAPI) TelemetryUnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- type GenericPipelineRequest
- type InternalServer
- func (s *InternalServer) GetSetPipelinesCommandsByService(ctx context.Context, req *protos.GetSetPipelinesCommandsByServiceRequest) (*protos.GetSetPipelinesCommandsByServiceResponse, error)
- func (s *InternalServer) Heartbeat(ctx context.Context, req *protos.HeartbeatRequest) (*protos.StandardResponse, error)
- func (s *InternalServer) Metrics(ctx context.Context, req *protos.MetricsRequest) (*protos.StandardResponse, error)
- func (s *InternalServer) NewAudience(ctx context.Context, req *protos.NewAudienceRequest) (*protos.StandardResponse, error)
- func (s *InternalServer) Notify(ctx context.Context, request *protos.NotifyRequest) (*protos.StandardResponse, error)
- func (s *InternalServer) Register(request *protos.RegisterRequest, server protos.Internal_RegisterServer) error
- func (s *InternalServer) SendSchema(ctx context.Context, req *protos.SendSchemaRequest) (*protos.StandardResponse, error)
- func (s *InternalServer) SendTail(srv protos.Internal_SendTailServer) error
- type Options
Constants ¶
const ( GRPCAuthMetadataKey = "auth-token" GRPCRequestIDMetadataKey = "request-id" )
const (
MaxKVCommandSizeBytes = 64 * 1024 // 64KB
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ExternalServer ¶
type ExternalServer struct { GRPCAPI // Must be implemented in order to satisfy the protos ExternalServer interface protos.UnimplementedExternalServer }
ExternalServer implements the external GRPC API interface
func (*ExternalServer) AppRegister ¶
func (s *ExternalServer) AppRegister(ctx context.Context, req *protos.AppRegistrationRequest) (*protos.StandardResponse, error)
func (*ExternalServer) AppRegisterReject ¶
func (s *ExternalServer) AppRegisterReject(ctx context.Context, req *protos.AppRegisterRejectRequest) (*protos.StandardResponse, error)
func (*ExternalServer) AppRegistrationStatus ¶
func (s *ExternalServer) AppRegistrationStatus(_ context.Context, req *protos.AppRegistrationStatusRequest) (*protos.AppRegistrationStatusResponse, error)
func (*ExternalServer) AppVerifyRegistration ¶
func (s *ExternalServer) AppVerifyRegistration(_ context.Context, req *protos.AppVerifyRegistrationRequest) (*protos.StandardResponse, error)
func (*ExternalServer) AttachNotification ¶
func (s *ExternalServer) AttachNotification(ctx context.Context, _ *protos.AttachNotificationRequest) (*protos.StandardResponse, error)
func (*ExternalServer) CreateAudience ¶ added in v0.0.32
func (s *ExternalServer) CreateAudience(ctx context.Context, req *protos.CreateAudienceRequest) (*protos.StandardResponse, error)
func (*ExternalServer) CreateNotification ¶
func (s *ExternalServer) CreateNotification(ctx context.Context, req *protos.CreateNotificationRequest) (*protos.CreateNotificationResponse, error)
func (*ExternalServer) CreatePipeline ¶
func (s *ExternalServer) CreatePipeline(ctx context.Context, req *protos.CreatePipelineRequest) (*protos.CreatePipelineResponse, error)
CreatePipeline creates a new pipeline and saves it to the store.
func (*ExternalServer) CreateWasm ¶ added in v0.0.41
func (s *ExternalServer) CreateWasm(ctx context.Context, req *protos.CreateWasmRequest) (*protos.CreateWasmResponse, error)
func (*ExternalServer) DeleteAudience ¶
func (s *ExternalServer) DeleteAudience(ctx context.Context, req *protos.DeleteAudienceRequest) (*protos.StandardResponse, error)
DeleteAudience will delete an audience. It will error if the audience has a pipeline attached to it. To get around the error, you can set the "force" bool in the request to true. This will delete the audience and emit a SetPipelines command set to [] for any connected SDKs.
func (*ExternalServer) DeleteNotification ¶
func (s *ExternalServer) DeleteNotification(ctx context.Context, req *protos.DeleteNotificationRequest) (*protos.StandardResponse, error)
func (*ExternalServer) DeletePipeline ¶
func (s *ExternalServer) DeletePipeline(ctx context.Context, req *protos.DeletePipelineRequest) (*protos.StandardResponse, error)
func (*ExternalServer) DeleteService ¶
func (s *ExternalServer) DeleteService(ctx context.Context, req *protos.DeleteServiceRequest) (*protos.StandardResponse, error)
DeleteService is basically DeleteAudience - the only difference is that DeleteService will (potentially) delete *multiple* audiences (instead of one).
func (*ExternalServer) DeleteWasm ¶ added in v0.0.41
func (s *ExternalServer) DeleteWasm(ctx context.Context, req *protos.DeleteWasmRequest) (*protos.StandardResponse, error)
DeleteWasm will delete a Wasm module by ID. Deleting bundled Wasm modules is not allowed.
func (*ExternalServer) DetachNotification ¶
func (s *ExternalServer) DetachNotification(ctx context.Context, _ *protos.DetachNotificationRequest) (*protos.StandardResponse, error)
func (*ExternalServer) GetAll ¶
func (s *ExternalServer) GetAll(ctx context.Context, req *protos.GetAllRequest) (*protos.GetAllResponse, error)
func (*ExternalServer) GetAllStream ¶
func (s *ExternalServer) GetAllStream(req *protos.GetAllRequest, server protos.External_GetAllStreamServer) error
func (*ExternalServer) GetAllWasm ¶ added in v0.0.41
func (s *ExternalServer) GetAllWasm(ctx context.Context, req *protos.GetAllWasmRequest) (*protos.GetAllWasmResponse, error)
func (*ExternalServer) GetAudienceRates ¶
func (s *ExternalServer) GetAudienceRates(_ *protos.GetAudienceRatesRequest, server protos.External_GetAudienceRatesServer) error
func (*ExternalServer) GetConfig ¶ added in v0.0.44
func (s *ExternalServer) GetConfig(ctx context.Context, _ *protos.GetConfigRequest) (*protos.GetConfigResponse, error)
func (*ExternalServer) GetMetrics ¶
func (s *ExternalServer) GetMetrics(_ *protos.GetMetricsRequest, server protos.External_GetMetricsServer) error
func (*ExternalServer) GetNotification ¶
func (s *ExternalServer) GetNotification(ctx context.Context, req *protos.GetNotificationRequest) (*protos.GetNotificationResponse, error)
func (*ExternalServer) GetNotifications ¶
func (s *ExternalServer) GetNotifications(ctx context.Context, req *protos.GetNotificationsRequest) (*protos.GetNotificationsResponse, error)
func (*ExternalServer) GetPipeline ¶
func (s *ExternalServer) GetPipeline(ctx context.Context, req *protos.GetPipelineRequest) (*protos.GetPipelineResponse, error)
GetPipeline returns a single pipeline by ID.
func (*ExternalServer) GetPipelines ¶
func (s *ExternalServer) GetPipelines(ctx context.Context, req *protos.GetPipelinesRequest) (*protos.GetPipelinesResponse, error)
GetPipelines returns a list of all known pipelines.
func (*ExternalServer) GetSchema ¶
func (s *ExternalServer) GetSchema(ctx context.Context, req *protos.GetSchemaRequest) (*protos.GetSchemaResponse, error)
func (*ExternalServer) GetWasm ¶ added in v0.0.41
func (s *ExternalServer) GetWasm(ctx context.Context, req *protos.GetWasmRequest) (*protos.GetWasmResponse, error)
func (*ExternalServer) PausePipeline ¶
func (s *ExternalServer) PausePipeline(ctx context.Context, req *protos.PausePipelineRequest) (*protos.StandardResponse, error)
func (*ExternalServer) PauseTail ¶
func (s *ExternalServer) PauseTail(ctx context.Context, req *protos.PauseTailRequest) (*protos.StandardResponse, error)
func (*ExternalServer) ResumePipeline ¶
func (s *ExternalServer) ResumePipeline(ctx context.Context, req *protos.ResumePipelineRequest) (*protos.StandardResponse, error)
func (*ExternalServer) ResumeTail ¶
func (s *ExternalServer) ResumeTail(ctx context.Context, req *protos.ResumeTailRequest) (*protos.StandardResponse, error)
func (*ExternalServer) SetPipelines ¶
func (s *ExternalServer) SetPipelines(ctx context.Context, req *protos.SetPipelinesRequest) (*protos.StandardResponse, error)
func (*ExternalServer) Tail ¶
func (s *ExternalServer) Tail(req *protos.TailRequest, server protos.External_TailServer) error
func (*ExternalServer) Test ¶
func (s *ExternalServer) Test(_ context.Context, req *protos.TestRequest) (*protos.TestResponse, error)
func (*ExternalServer) UpdateNotification ¶
func (s *ExternalServer) UpdateNotification(ctx context.Context, req *protos.UpdateNotificationRequest) (*protos.StandardResponse, error)
func (*ExternalServer) UpdatePipeline ¶
func (s *ExternalServer) UpdatePipeline(ctx context.Context, req *protos.UpdatePipelineRequest) (*protos.StandardResponse, error)
UpdatePipeline updates an existing pipeline (and broadcasts the update which will cause the broadcast handlers to emit SetPipeline commands to any connected SDKs).
func (*ExternalServer) UpdateWasm ¶ added in v0.0.41
func (s *ExternalServer) UpdateWasm(ctx context.Context, req *protos.UpdateWasmRequest) (*protos.StandardResponse, error)
UpdateWasm will update _existing_ wasm. Updating bundled wasm modules is not allowed.
type GRPCAPI ¶
type GRPCAPI struct { Options *Options // contains filtered or unexported fields }
func (*GRPCAPI) AuthServerStreamInterceptor ¶
func (g *GRPCAPI) AuthServerStreamInterceptor(srv interface{}, stream grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler) error
func (*GRPCAPI) AuthServerUnaryInterceptor ¶
func (g *GRPCAPI) AuthServerUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
AuthServerUnaryInterceptor is a GRPC interceptor (middleware) that checks for a valid auth token
func (*GRPCAPI) RequestIDServerStreamInterceptor ¶
func (g *GRPCAPI) RequestIDServerStreamInterceptor(srv interface{}, stream grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler) error
func (*GRPCAPI) RequestIDServerUnaryInterceptor ¶
func (g *GRPCAPI) RequestIDServerUnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
RequestIDServerUnaryInterceptor will set a request ID if one is not already set
func (*GRPCAPI) TelemetryStreamInterceptor ¶
func (g *GRPCAPI) TelemetryStreamInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
func (*GRPCAPI) TelemetryUnaryInterceptor ¶
func (g *GRPCAPI) TelemetryUnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
type GenericPipelineRequest ¶ added in v0.0.41
type GenericPipelineRequest interface { ~*protos.CreatePipelineRequest | ~*protos.UpdatePipelineRequest }
type InternalServer ¶
type InternalServer struct { GRPCAPI // Must be implemented in order to satisfy the protos InternalServer interface protos.UnimplementedInternalServer }
InternalServer implements the internal GRPC API interface
func (*InternalServer) GetSetPipelinesCommandsByService ¶
func (s *InternalServer) GetSetPipelinesCommandsByService( ctx context.Context, req *protos.GetSetPipelinesCommandsByServiceRequest, ) (*protos.GetSetPipelinesCommandsByServiceResponse, error)
func (*InternalServer) Heartbeat ¶
func (s *InternalServer) Heartbeat(ctx context.Context, req *protos.HeartbeatRequest) (*protos.StandardResponse, error)
func (*InternalServer) Metrics ¶
func (s *InternalServer) Metrics(ctx context.Context, req *protos.MetricsRequest) (*protos.StandardResponse, error)
func (*InternalServer) NewAudience ¶
func (s *InternalServer) NewAudience(ctx context.Context, req *protos.NewAudienceRequest) (*protos.StandardResponse, error)
func (*InternalServer) Notify ¶
func (s *InternalServer) Notify(ctx context.Context, request *protos.NotifyRequest) (*protos.StandardResponse, error)
func (*InternalServer) Register ¶
func (s *InternalServer) Register(request *protos.RegisterRequest, server protos.Internal_RegisterServer) error
func (*InternalServer) SendSchema ¶
func (s *InternalServer) SendSchema(ctx context.Context, req *protos.SendSchemaRequest) (*protos.StandardResponse, error)
func (*InternalServer) SendTail ¶
func (s *InternalServer) SendTail(srv protos.Internal_SendTailServer) error
type Options ¶
type Options struct { Config *config.Config MetricsService metrics.IMetrics StoreService store.IStore BusService bus.IBus ShutdownContext context.Context CmdService cmd.ICmd NotifyService notify.INotifier RedisBackend *redis.Client PubSubService pubsub.IPubSub KVService kv.IKV Telemetry statsd.Statter WasmService wasm.IWasm DemoMode bool InstallID string NodeID string }