controller_service

package
v0.0.0-...-f839e32 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrHandlerUnavailable = fmt.Errorf("user-provided call handler is not installed")

ObjectsReportHandler is a user-provided handler for ObjectsReport call

TasksHandler is a user-provided handler for Tasks call

Functions

func ClaimsExtractorMapClaims

func ClaimsExtractorMapClaims(ctx context.Context) jwt.Claims

ClaimsExtractorMapClaims extracts claims as jwt.MapClaims from context

func ExtractClaims

func ExtractClaims(ctx context.Context) jwt.Claims

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 GetIncomingQueue() chan *common.Task

func GetOutgoingQueue

func GetOutgoingQueue() chan *common.Task

func IncomingTasksHandler

func IncomingTasksHandler(incomingQueue, outgoingQueue chan *common.Task)

Types

type ClaimsExtractorFunction

type ClaimsExtractorFunction = func(context.Context) jwt.Claims

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.

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

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 (*HealthServer) Watch

type ReportsPlaneServer

type ReportsPlaneServer struct {
	service.UnimplementedReportsPlaneServer
}

ReportsPlaneServer specifies default ReportsPlaneServer

func NewReportsPlaneServer

func NewReportsPlaneServer() *ReportsPlaneServer

NewReportsPlaneServer creates new ReportsPlaneServer

func (*ReportsPlaneServer) ObjectsReport

ObjectsReport gRPC call

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL