server

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Proto              string
	Hostname           string
	HookBase           string
	Addr               string
	ServerKeyPath      string
	ServerCrtPath      string
	AutoTLS            bool
	CacheDir           string
	GlobalTokenKey     string
	GoogleClientID     string
	GoogleClientSecret string
}

Config is the configuration of the server

type Dependencies

type Dependencies struct {
	Logger                 zerolog.Logger
	HookHandler            providers.HookHandler
	UserMiddleware         providers.UserMiddleware
	CommandHandler         providers.CommandHandler
	CommandSettingsHandler providers.CommandSettingsHandler
	CommandRunHandler      providers.CommandRunHandler
	RepositoryHandler      providers.RepositoryHandler
	APIKeyHandler          providers.APIKeysHandler
	AuthHandler            providers.AuthHandler
	TokenHandler           providers.TokenHandler
	VCSTokenHandler        providers.VCSTokenHandler
	SupportedPlatformList  providers.SupportedPlatformListHandler
	EventsHandler          providers.EventHandler
	VaultHandler           providers.VaultHandler
	UserHandler            providers.UserHandler
	ReadyHandler           providers.ReadyHandler
}

Dependencies defines needed dependencies for the krok server.

type KrokServer

type KrokServer struct {
	Config
	Dependencies
}

KrokServer is a server.

func NewKrokServer

func NewKrokServer(cfg Config, deps Dependencies) *KrokServer

NewKrokServer creates a new krok server.

func (*KrokServer) Run

func (s *KrokServer) Run(ctx context.Context) error

Run starts up listening.

type Server

type Server interface {
	Run(context.Context) error
}

Server defines a server which runs and accepts requests.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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