registry

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: NCSA Imports: 20 Imported by: 3

README

Registry Build Status

Config

registry:
  provider: etcd
  endpoints:
    - 127.0.0.1
  username: root
  password: foo
  timeout: 5s
  certificate: XXX
  bucket: name_of_bucket
  header_timeout_per_request: 1m
  auto_sync: true

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config = &registryConfig{
		done: make(chan struct{}),
	}
)

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func AutoSync

func AutoSync(v bool) Option

func Bucket

func Bucket(s string) Option

func Endpoint

func Endpoint(addr string) Option

func Endpoints

func Endpoints(addrs []string) Option

func HeaderTimeoutPerRequest

func HeaderTimeoutPerRequest(t time.Duration) Option

func Password

func Password(s string) Option

func PersistConnection

func PersistConnection(b bool) Option

func Provider

func Provider(s string) Option

func TLSCertificate

func TLSCertificate(s string) Option

func TLSConfig

func TLSConfig(t *tls.Config) Option

func Timeout

func Timeout(t time.Duration) Option

func Username

func Username(s string) Option

func UsernamePassword

func UsernamePassword(u string, p string) Option

type Options

type Options struct {
	Provider          store.Backend
	Username          string
	Password          string
	Endpoints         []string
	Timeout           time.Duration
	Bucket            string
	TLSConfig         *tls.Config
	PersistConnection bool

	Context context.Context
}

type RegisterOption

type RegisterOption func(*RegisterOptions)

type RegisterOptions

type RegisterOptions struct {
	TTL     time.Duration
	Context context.Context
}

type Service

type Service struct {
	Name string
}

type Store

type Store interface {
	store.Store
}

func New

func New(opts ...Option) (Store, error)

Jump to

Keyboard shortcuts

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