services

package
v1.8.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MPL-2.0 Imports: 50 Imported by: 0

Documentation

Overview

Package services contains minimal versions of Talos services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServerGracefulStop

func ServerGracefulStop(server *grpc.Server, shutdownCtx context.Context)

ServerGracefulStop the server with a timeout.

Core gRPC doesn't support timeouts.

Types

type APID

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

APID is the emulated APId Talos service.

func NewAPID

func NewAPID(machineID string, state state.State, globalState state.State) *APID

NewAPID creates new APID.

func (*APID) Run

func (apid *APID) Run(ctx context.Context, endpoint netip.Prefix, logger *zap.Logger, apiCerts *secrets.API, iface string) error

Run creates COSI runtime, generates certs, registers gRPC services.

func (*APID) Stop

func (apid *APID) Stop() error

Stop shuts down the runtime and gRPC services.

type TLSProvider

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

TLSProvider provides TLS configuration for maintenance service.

func NewTLSProvider

func NewTLSProvider() *TLSProvider

NewTLSProvider creates a new TLS provider for maintenance service.

The provider expects that the certificates are pushed to it.

func (*TLSProvider) ClientConfig

func (provider *TLSProvider) ClientConfig() (*stdlibtls.Config, error)

ClientConfig implements client config provider interface.

func (*TLSProvider) GetCA

func (provider *TLSProvider) GetCA() ([]byte, error)

GetCA implements tls.CertificateProvider interface.

func (*TLSProvider) GetCACertPool

func (provider *TLSProvider) GetCACertPool() (*stdlibx509.CertPool, error)

GetCACertPool implements tls.CertificateProvider interface.

func (*TLSProvider) GetCertificate

func (provider *TLSProvider) GetCertificate(*stdlibtls.ClientHelloInfo) (*stdlibtls.Certificate, error)

GetCertificate implements tls.CertificateProvider interface.

func (*TLSProvider) GetClientCertificate

func (provider *TLSProvider) GetClientCertificate(*stdlibtls.CertificateRequestInfo) (*stdlibtls.Certificate, error)

GetClientCertificate implements tls.CertificateProvider interface.

func (*TLSProvider) Update

func (provider *TLSProvider) Update(endpoint net.IP, apiCerts *secrets.API) error

Update the certificate in the provider.

Directories

Path Synopsis
apid
pkg/backend
Package backend implements backends satisfying proxy.Backend interface
Package backend implements backends satisfying proxy.Backend interface
pkg/director
Package director provides proxy call routing facility
Package director provides proxy call routing facility

Jump to

Keyboard shortcuts

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