driver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package driver implements gRPC server for handling requests to the COSI driver as specified by COSI specification.

Index

Constants

View Source
const (
	// COSISocket is a default location of COSI API UNIX socket.
	COSISocket = "/var/lib/cosi/cosi.sock"
)

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, config *config.ConfigSchemaJson, socket, name string) (<-chan struct{}, error)

Run starts the gRPC server for the identity and provisioner servers. This function will not block and instead will provide channel for checking when the driver is ready. Await for context if you want the thread you are running this in to block.

func RunBlocking

func RunBlocking(ctx context.Context, config *config.ConfigSchemaJson, socket, name string) error

RunBlocking is a blocking version of Run.

Types

type Driver

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

Driver structure for storing server and listener instances.

func New

func New(config *config.ConfigSchemaJson, socket, name string) (*Driver, error)

New creates a new driver for COSI API with identity and provisioner servers.

Jump to

Keyboard shortcuts

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