Documentation
¶
Index ¶
- Constants
- func NewDrivenGRPCServerWithOptions(mainConf map[string]interface{}, opts ...Option) *server
- func NewDrivenHTTPServerWithOptions(mainConf map[string]interface{}, opts ...Option) *server
- func Run(mainConf map[string]interface{}, pidFile, logLevel string)
- func RunWithOptions(mainConf map[string]interface{}, pidFile string, opts ...Option)
- type Option
- type Options
- type RevaDrivenServer
Constants ¶
const ( HTTP = iota GRPC )
Variables ¶
This section is empty.
Functions ¶
func NewDrivenGRPCServerWithOptions ¶ added in v2.38.0
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
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 RunWithOptions ¶
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 ¶
WithLogger provides a function to set the logger option.
func WithRegistry ¶
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
RevaDrivenServer is an interface that defines the methods for starting and stopping reva HTTP/GRPC services.