web

package
v0.0.73 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewServerRunOptionsSet = wire.NewSet(wire.Struct(new(ServerRunOptions), "Provider", "WebServerOptions", "AppInfo"), viper.GetViper, NewProviderConfig,
	NewWebServerConfig,
	NewAppInfoConfig)

Functions

func CommandE added in v0.0.6

func CommandE(ctx context.Context) func(cmd *cobra.Command, args []string) error

func New

func New(ctx context.Context) *cobra.Command

New represent the web command

func NewAppInfo added in v0.0.59

func NewAppInfo(ctx context.Context, opt *ServerRunOptions) error

NewAppInfo is a Wire injector function that sets up the server using config file.

func NewAppInfoConfig added in v0.0.59

func NewAppInfoConfig(v *viper.Viper) *appinfo.Config

func NewConfig added in v0.0.59

func NewConfig(ctx context.Context, opt *ServerRunOptions) (*provider.Provider, error)

NewConfig is a Wire injector function that sets up the server using config file.

func NewProviderConfig added in v0.0.59

func NewProviderConfig(v *viper.Viper) *provider.Config

func NewSecrets added in v0.0.59

func NewSecrets(ctx context.Context, config *provider.Provider) (*secrets.Keeper, func(), error)

NewSecrets is a Wire injector function that sets up the server using config file.

func NewWebServer added in v0.0.59

func NewWebServer(ctx context.Context, opt *ServerRunOptions) (*webserver.WebServer, func(), error)

NewWebServer is a Wire injector function that sets up the server using WebServer(grpc+http).

func NewWebServerConfig added in v0.0.59

func NewWebServerConfig(v *viper.Viper) *webserver.Config

Types

type CompletedServerRunOptions

type CompletedServerRunOptions struct {
	// contains filtered or unexported fields
}

CompletedServerRunOptions is a private wrapper that enforces a call of Complete() before Run can be invoked.

func (*CompletedServerRunOptions) Run added in v0.0.7

Run runs the specified APIServer. This should never exit.

type ServerRunOptions

type ServerRunOptions struct {
	Provider *provider.Config

	// GRPC+HTTP
	WebServerOptions *webserver.Config

	AppInfo *appinfo.Config
	Logs    *logs.Config
}

ServerRunOptions runs a kubernetes api server.

func NewServerRunOptions

func NewServerRunOptions() (*ServerRunOptions, error)

func (*ServerRunOptions) Complete added in v0.0.7

Complete set default ServerRunOptions.

func (*ServerRunOptions) Validate

func (s *ServerRunOptions) Validate(validate *validator.Validate) []error

Validate checks ServerRunOptions and return a slice of found errs.

Jump to

Keyboard shortcuts

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