services

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package services builds and configures a dependency tree of otf services. For use by the otfd binary and for integration testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AgentConfig          *agent.Config
	LoggerConfig         *cmdutil.LoggerConfig
	CacheConfig          *inmem.CacheConfig
	Github               cloud.CloudOAuthConfig
	Gitlab               cloud.CloudOAuthConfig
	Secret               string // secret for signing URLs
	SiteToken            string
	Host                 string
	Address, Database    string
	MaxConfigSize        int64
	SSL                  bool
	CertFile, KeyFile    string
	EnableRequestLogging bool
	DevMode              bool
}

func NewDefaultConfig

func NewDefaultConfig() Config

type Services

func New

func New(logger logr.Logger, db otf.DB, cfg Config) (*Services, error)

New builds and configures otf services and their http handlers.

func (*Services) NewAgent

func (s *Services) NewAgent(logger logr.Logger) (daemon, error)

func (*Services) NewServer

func (s *Services) NewServer(logger logr.Logger) (*http.Server, net.Listener, error)

func (*Services) StartScheduler

func (s *Services) StartScheduler(ctx context.Context, logger logr.Logger, db otf.DB) error

Jump to

Keyboard shortcuts

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