clients

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: BSD-3-Clause Imports: 4 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Clients = map[string]*VersionedClient{}

Clients contains the map of versioned clients

Functions

func Add

func Add(v string, constraint version.Constraints, creator Creator)

Add exposes the ability for each versioned client to register itself for use

Types

type ClientOptions

type ClientOptions struct {
	URLs       []string
	UserInfo   *url.Userinfo
	HTTPClient *http.Client
	Index      string
	ParentID   string
}

ClientOptions defines the available options that can be used to configured the client.Writer

type Creator

type Creator func(*ClientOptions) (client.Writer, error)

Creator defines the func signature expected for any implementing Writer

type VersionedClient

type VersionedClient struct {
	Constraint version.Constraints
	Creator    Creator
}

VersionedClient encapsulates a version.Constraints and Creator func that can be stopred in the Clients map.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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