runtime

package
v2.40.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: Apache-2.0 Imports: 52 Imported by: 17

Documentation

Index

Constants

View Source
const (
	HTTP = iota
	GRPC
)

Variables

This section is empty.

Functions

func NewDrivenGRPCServerWithOptions added in v2.38.0

func NewDrivenGRPCServerWithOptions(mainConf map[string]interface{}, opts ...Option) *server

NewDrivenGRPCServerWithOptions runs a revad server w/o watcher with the given config file and options. Use it in cases where you want to run a revad server without the need for a watcher and the os signal handling as a part of another runtime. Returns nil if no grpc server is configured in the config file. The GracefulShutdownTimeout set to default 20 seconds and can be overridden in the core config. Logging a fatal error and exit with code 1 if the grpc server cannot be created.

func NewDrivenHTTPServerWithOptions added in v2.38.0

func NewDrivenHTTPServerWithOptions(mainConf map[string]interface{}, opts ...Option) *server

NewDrivenHTTPServerWithOptions runs a revad server w/o watcher with the given config file and options. Use it in cases where you want to run a revad server without the need for a watcher and the os signal handling as a part of another runtime. Returns nil if no http server is configured in the config file. The GracefulShutdownTimeout set to default 20 seconds and can be overridden in the core config. Logging a fatal error and exit with code 1 if the http server cannot be created.

func Run

func Run(mainConf map[string]interface{}, pidFile, logLevel string)

Run runs a reva server with the given config file and pid file.

func RunWithOptions

func RunWithOptions(mainConf map[string]interface{}, pidFile string, opts ...Option)

RunWithOptions runs a reva server with the given config file, pid file and options.

Types

type Option

type Option func(o *Options)

Option defines a single option function.

func WithLogger

func WithLogger(logger *zerolog.Logger) Option

WithLogger provides a function to set the logger option.

func WithRegistry

func WithRegistry(r registry.Registry) Option

WithRegistry provides a function to set the registry.

func WithTraceProvider

func WithTraceProvider(tp trace.TracerProvider) Option

WithTraceProvider provides a function to set the trace provider.

type Options

type Options struct {
	Logger        *zerolog.Logger
	Registry      registry.Registry
	TraceProvider trace.TracerProvider
}

Options defines the available options for this package.

type RevaDrivenServer added in v2.38.0

type RevaDrivenServer interface {
	Start() error
	Stop() error
}

RevaDrivenServer is an interface that defines the methods for starting and stopping reva HTTP/GRPC services.

Jump to

Keyboard shortcuts

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