Documentation ¶
Index ¶
- Variables
- func ClaimsExtractorMapClaims(ctx context.Context) jwt.Claims
- func ExtractClaims(ctx context.Context) jwt.Claims
- func GetIncomingQueue() chan *common.Task
- func GetOutgoingQueue() chan *common.Task
- func IncomingTasksHandler(incomingQueue, outgoingQueue chan *common.Task)
- type ClaimsExtractorFunction
- type ControlPlaneServer
- type DataPlaneServer
- type HealthServer
- type ReportsPlaneServer
Constants ¶
This section is empty.
Variables ¶
var ObjectsReportHandler = func(context.Context, *common.ObjectsRequest, jwt.Claims) (*common.ObjectsList, error) { return nil, ErrHandlerUnavailable }
ObjectsReportHandler is a user-provided handler for ObjectsReport call
var TasksHandler = func(service.ControlPlane_TasksServer, jwt.Claims) error { return ErrHandlerUnavailable }
TasksHandler is a user-provided handler for Tasks call
Functions ¶
func ClaimsExtractorMapClaims ¶
ClaimsExtractorMapClaims extracts claims as jwt.MapClaims from context
func ExtractClaims ¶
ExtractClaims in an interface function expected to be used by user after ClaimsExtractor was set up. It mainly wraps if into one-liner.
func GetIncomingQueue ¶
func GetOutgoingQueue ¶
func IncomingTasksHandler ¶
Types ¶
type ClaimsExtractorFunction ¶
ClaimsExtractorFunction is a function, used to extract claims from incoming gRPC request context. Claims enclosed in the context can vary, depending on what exactly client send. Server has to understand what claims are sent, that's why we need to have claims extractor configurable.
var ClaimsExtractor ClaimsExtractorFunction = ClaimsExtractorMapClaims
ClaimsExtractor provides function to extract claims. This function can be provided by user, however, there are the following predefined functions ATM: 1. ClaimsExtractorMapClaims extracts claims as jwt.MapClaims from context 2. ClaimsExtractorScopeClaims extracts claims as service_auth.ScopeClaims from context
type ControlPlaneServer ¶
type ControlPlaneServer struct {
service.UnimplementedControlPlaneServer
}
ControlPlaneServer specifies default ControlPlaneServer
func NewControlPlaneServer ¶
func NewControlPlaneServer() *ControlPlaneServer
NewControlPlaneServer creates new ControlPlaneServer
func (*ControlPlaneServer) Tasks ¶
func (s *ControlPlaneServer) Tasks(TasksServer service.ControlPlane_TasksServer) error
Tasks gRPC call
type DataPlaneServer ¶
type DataPlaneServer struct { service.UnimplementedDataPlaneServer // DataChunksHandler is a user-provided handler for DataChunks call DataChunksHandler func(service.DataPlane_DataChunksServer, jwt.Claims) error // UploadObjectHandler is a user-provided handler for UploadObject call UploadObjectHandler func(service.DataPlane_UploadObjectServer, jwt.Claims) error // DownloadObjectHandler is a user-provided handler for DownloadObject call DownloadObjectHandler func(*common.ObjectRequest, service.DataPlane_DownloadObjectServer, jwt.Claims) error }
DataPlaneServer specifies default DataPlaneServer
func NewDataPlaneServer ¶
func NewDataPlaneServer( dataChunksHandler func(service.DataPlane_DataChunksServer, jwt.Claims) error, uploadObjectHandler func(service.DataPlane_UploadObjectServer, jwt.Claims) error, downloadObjectHandler func(*common.ObjectRequest, service.DataPlane_DownloadObjectServer, jwt.Claims) error, ) *DataPlaneServer
NewDataPlaneServer creates new DataPlaneServer
func (*DataPlaneServer) DataChunks ¶
func (s *DataPlaneServer) DataChunks(DataChunksServer service.DataPlane_DataChunksServer) error
DataChunks gRPC call
func (*DataPlaneServer) DownloadObject ¶
func (s *DataPlaneServer) DownloadObject(request *common.ObjectRequest, DownloadObjectServer service.DataPlane_DownloadObjectServer) error
DownloadObject gRPC call
func (*DataPlaneServer) UploadObject ¶
func (s *DataPlaneServer) UploadObject(UploadObjectServer service.DataPlane_UploadObjectServer) error
UploadObject gRPC call
type HealthServer ¶
type HealthServer struct {
service.UnimplementedHealthServer
}
func NewHealthServer ¶
func NewHealthServer() *HealthServer
func (*HealthServer) Check ¶
func (h *HealthServer) Check(ctx context.Context, args *common.HealthCheckRequest) (*common.HealthCheckResponse, error)
func (*HealthServer) Watch ¶
func (h *HealthServer) Watch(*common.HealthCheckRequest, service.Health_WatchServer) error
type ReportsPlaneServer ¶
type ReportsPlaneServer struct {
service.UnimplementedReportsPlaneServer
}
ReportsPlaneServer specifies default ReportsPlaneServer
func NewReportsPlaneServer ¶
func NewReportsPlaneServer() *ReportsPlaneServer
NewReportsPlaneServer creates new ReportsPlaneServer
func (*ReportsPlaneServer) ObjectsReport ¶
func (s *ReportsPlaneServer) ObjectsReport(ctx context.Context, req *common.ObjectsRequest) (*common.ObjectsList, error)
ObjectsReport gRPC call