server

package
v0.7.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServer

func RunServer(
	ctx context.Context,
	c Config,
	logger log.Logger,
	apiDeps *api.Deps) error

RunServer runs the application server

Types

type Config

type Config struct {
	Host                  string            `mapstructure:"host" yaml:"host" default:"localhost"`
	Port                  int               `mapstructure:"port" yaml:"port" default:"8080"`
	EncryptionKey         string            `mapstructure:"encryption_key" yaml:"encryption_key" default:"_ENCRYPTIONKEY_OF_32_CHARACTERS_"`
	APIHeaders            api.HeadersConfig `mapstructure:"api_headers" yaml:"api_headers"`
	UseGlobalSubscription bool              `mapstructure:"use_global_subscription" yaml:"use_global_subscription" default:"false"`
	EnableSilenceFeature  bool              `mapstructure:"enable_silence_feature" yaml:"enable_silence_feature" default:"false"`
	DebugRequest          bool              `mapstructure:"debug_request" yaml:"debug_request" default:"false"`
	GRPC                  GRPCConfig        `mapstructure:"grpc"`
}

type GRPCConfig added in v0.6.7

type GRPCConfig struct {
	Port           int `yaml:"port" mapstructure:"port" default:"8081"`
	MaxRecvMsgSize int `yaml:"max_recv_msg_size" mapstructure:"max_recv_msg_size" default:"33554432"`
	MaxSendMsgSize int `yaml:"max_send_msg_size" mapstructure:"max_send_msg_size" default:"33554432"`
}

Jump to

Keyboard shortcuts

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