cache

package
v0.57.13 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 13 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 {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(opts ...Option) *Config

func (*Config) Addr

func (cfg *Config) Addr() string

func (*Config) WithOptions

func (config *Config) WithOptions(opts ...Option) *Config

type Option

type Option func(Config) Config

func WithHostname

func WithHostname(hostname string) Option

func WithPort

func WithPort(port int) Option

func WithProviderArchiveDir

func WithProviderArchiveDir(archiveDir string) Option

func WithProviderCacheDir

func WithProviderCacheDir(cacheDir string) Option

func WithToken

func WithToken(token string) Option

func WithUserProviderDir

func WithUserProviderDir(userProviderDir string) Option

type Server

type Server struct {
	*http.Server

	Provider *services.ProviderService
	// contains filtered or unexported fields
}

Server is a private Terraform cache for provider caching.

func NewServer

func NewServer(opts ...Option) *Server

NewServer returns a new Server instance.

func (*Server) Listen

func (server *Server) Listen() (net.Listener, error)

Listen starts listening to the given configuration address. It also automatically chooses a free port if not explicitly specified.

func (*Server) ProviderURL

func (server *Server) ProviderURL() *url.URL

ProviderURL returns a full URL to the provider controller, e.g. http://localhost:5758/v1/providers

func (*Server) Run

func (server *Server) Run(ctx context.Context, ln net.Listener) error

Run starts the webserver and workers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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