api

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorInterceptor

func ErrorInterceptor() grpc.UnaryServerInterceptor

func ErrorStreamInterceptor

func ErrorStreamInterceptor() grpc.StreamServerInterceptor

func GRPCGateway

func GRPCGateway(ctx context.Context, conf *Config, register RegisterHandlersFunc) (start func(context.Context) error, stop func(context.Context) error, err error)

func GrpcHandlers

func GrpcHandlers(storages *s3.StorageConfig, s3clients s3client.Service, taskClient *asynq.Client, rclone rclone.Service, policySvc policy.Service, locker lock.Service, proxyClient rpc.Proxy, agentClient *rpc.AgentClient, notificationSvc *notifications.Service) pb.ChorusServer

func NewGrpcServer

func NewGrpcServer(port int, handlers pb.ChorusServer, tracer otel_trace.TracerProvider, logConf *log.Config, version dom.AppInfo) (start func(context.Context) error, stop func(context.Context) error, err error)

Types

type Config

type Config struct {
	Enabled  bool `yaml:"enabled"`
	GrpcPort int  `yaml:"grpcPort"`
	HttpPort int  `yaml:"httpPort"`
	Secure   bool `yaml:"secure"`
}

type RegisterHandlersFunc

type RegisterHandlersFunc func(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) error

Jump to

Keyboard shortcuts

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