proservices

package
v0.0.0-...-7db3de3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Overview

Package proservices is in charge of managing the GRPC services and all business-logic side.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitWSLAPI

func InitWSLAPI()

InitWSLAPI initializes the GoWSL underlying component to prevent access errors due bad interaction with the MS Store API, thus it must be called as early as possible.

func WithRegistry

func WithRegistry(registry registrywatcher.Registry) func(o *options)

WithRegistry allows overriding the Windows registry with a different back-end.

Types

type Manager

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

Manager is the orchestrator of GRPC API services and business logic.

func New

func New(ctx context.Context, publicDir, privateDir string, args ...Option) (s Manager, err error)

New returns a new GRPC services manager. It instantiates both ui and wsl instance services.

Once done, Stop must be called to deallocate resources.

func (Manager) RegisterGRPCServices

func (m Manager) RegisterGRPCServices(ctx context.Context) *grpc.Server

RegisterGRPCServices returns a new grpc Server with the 2 api services attached to it. It also gets the correct middlewares hooked in.

func (Manager) Stop

func (m Manager) Stop(ctx context.Context)

Stop deallocates resources in the services.

type Option

type Option func(*options)

Option is the function signature we are passing to tweak the daemon creation.

Directories

Path Synopsis
Package landscape implements a client to the Landscape Host Agent API service.
Package landscape implements a client to the Landscape Host Agent API service.
distroinstall
Package distroinstall exists to implement various utilities used by landscape that need to be mocked in tests.
Package distroinstall exists to implement various utilities used by landscape that need to be mocked in tests.
Package registrywatcher implements a service that updates the config every time the registry changes.
Package registrywatcher implements a service that updates the config every time the registry changes.
registry
Package registry simplifies read/write access to the registry and allows for mocking during tests.
Package registry simplifies read/write access to the registry and allows for mocking during tests.
Package ui implements the GRPC UI service.
Package ui implements the GRPC UI service.
Package wslinstance implements the GRPC WSLInstance service.
Package wslinstance implements the GRPC WSLInstance service.

Jump to

Keyboard shortcuts

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