server

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MPL-2.0 Imports: 25 Imported by: 3

Documentation

Index

Constants

View Source
const DefaultHost = "0.0.0.0"
View Source
const DefaultPort = "9001"

Variables

View Source
var (
	ErrEmptyAccessToken = errors.New("access token is empty")
	ErrBadProvider      = errors.New("wrong provider name")
)
View Source
var (
	PublicRoutes = []string{
		"/v1/featureflags",
	}
)

Functions

func NewApplicationsServer

func NewApplicationsServer(cfg *ApplicationsConfig, setters ...ApplicationsOption) pb.ApplicationsServer

NewApplicationsServer creates a grpc Applications server

func NewHandlers added in v0.6.0

func NewHandlers(ctx context.Context, log logr.Logger, cfg *Config) (http.Handler, error)

Types

type ApplicationsConfig added in v0.2.3

type ApplicationsConfig struct {
	Logger           logr.Logger
	Factory          services.Factory
	JwtClient        auth.JWTClient
	GithubAuthClient auth.GithubAuthClient
	GitlabAuthClient auth.GitlabAuthClient
	ClusterConfig    kube.ClusterConfig
}

An ApplicationsConfig allows for the customization of an ApplicationsServer. Use the DefaultConfig() to use the default dependencies.

func DefaultApplicationsConfig added in v0.6.0

func DefaultApplicationsConfig(log logr.Logger) (*ApplicationsConfig, error)

DefaultApplicationsConfig creates a populated config with the dependencies for a Server

type ApplicationsOption added in v0.6.1

type ApplicationsOption func(*ApplicationsOptions)

ApplicationsOption defines the signature of a function that can be used to set an option for an ApplicationsServer.

func WithClientGetter added in v0.6.1

func WithClientGetter(clientGetter kube.ClientGetter) ApplicationsOption

WithClientGetter allows for setting a ClientGetter.

type ApplicationsOptions added in v0.6.1

type ApplicationsOptions struct {
	ClientGetter kube.ClientGetter
}

ApplicationsOptions includes all the options that can be set for an ApplicationsServer.

type Config added in v0.6.0

type Config struct {
	AppConfig        *ApplicationsConfig
	AppOptions       []ApplicationsOption
	CoreServerConfig core.CoreServerConfig
	AuthServer       *auth.AuthServer
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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