...

Package xserver

import "edge-infra.dev/pkg/sds/display/k8s/controllers/xserver"
Overview
Index
Subdirectories

Overview ▾

func Run

func Run(ctx context.Context, opts ...controller.Option) error

type ConfigController

ConfigController watches for the node's xserver-config ConfigMap and writes it to a file on updates, also sending it to the xserver-manager's config channel.

type ConfigController struct {
    Name     string
    Hostname string
    // contains filtered or unexported fields
}

func NewConfigController

func NewConfigController(hostname string, configChan configChannel, c client.Client) *ConfigController

func (*ConfigController) Reconcile

func (c *ConfigController) Reconcile(ctx context.Context, _ ctrl.Request) (ctrl.Result, error)

func (*ConfigController) SetupWithManager

func (c *ConfigController) SetupWithManager(mgr ctrl.Manager) error

type Runnable

Runnable is a thread which manages the X process. It will start the xinit process and restart it on any changes to the configuration sent from the config controller.

type Runnable struct {
    Name     string
    Hostname string

    // Handles the lifecycle of the xinit process.
    processmanager.Process

    // Config configures the X server.
    *xserverconfig.Config
    // contains filtered or unexported fields
}

func NewXServerRunnable

func NewXServerRunnable(displayManager manager.DisplayManager, configChan configChannel, c client.Client, log logr.Logger) (*Runnable, error)

func (*Runnable) SetupWithManager

func (r *Runnable) SetupWithManager(mgr ctrl.Manager) error

func (*Runnable) Start

func (r *Runnable) Start(ctx context.Context) (err error)

Runs the xinit process, restarting it on any changes to X server configuration.

Exits when context is cancelled or any errors are returned from the process manager.

Subdirectories

Name Synopsis
..
config