v1

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package v1 provides the gpud v1 client for the server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockUntilServerReady

func BlockUntilServerReady(ctx context.Context, addr string, opts ...OpOption) error

func CheckHealthz

func CheckHealthz(ctx context.Context, addr string, opts ...OpOption) error

func GetComponents

func GetComponents(ctx context.Context, addr string, opts ...OpOption) ([]string, error)

func GetEvents

func GetEvents(ctx context.Context, addr string, opts ...OpOption) (v1.LeptonEvents, error)

func GetInfo

func GetInfo(ctx context.Context, addr string, opts ...OpOption) (v1.LeptonInfo, error)

func GetMetrics

func GetMetrics(ctx context.Context, addr string, opts ...OpOption) (v1.LeptonMetrics, error)

func GetStates

func GetStates(ctx context.Context, addr string, opts ...OpOption) (v1.LeptonStates, error)

func ReadComponents

func ReadComponents(rd io.Reader, opts ...OpOption) ([]string, error)

func ReadEvents

func ReadEvents(rd io.Reader, opts ...OpOption) (v1.LeptonEvents, error)

func ReadInfo

func ReadInfo(rd io.Reader, opts ...OpOption) (v1.LeptonInfo, error)

func ReadMetrics

func ReadMetrics(rd io.Reader, opts ...OpOption) (v1.LeptonMetrics, error)

func ReadStates

func ReadStates(rd io.Reader, opts ...OpOption) (v1.LeptonStates, error)

Types

type Op

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

type OpOption

type OpOption func(*Op)

func WithAcceptEncodingGzip

func WithAcceptEncodingGzip() OpOption

WithAcceptEncodingGzip requests gzip encoding for the response.

func WithCheckInterval

func WithCheckInterval(interval time.Duration) OpOption

func WithComponent added in v0.0.2

func WithComponent(component string) OpOption

func WithHTTPClient

func WithHTTPClient(cli *http.Client) OpOption

func WithRequestContentTypeJSON

func WithRequestContentTypeJSON() OpOption

WithRequestContentTypeJSON sets the request content type to JSON.

func WithRequestContentTypeYAML

func WithRequestContentTypeYAML() OpOption

WithRequestContentTypeYAML sets the request content type to YAML.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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