register

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 18 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(ctx context.Context, config *Config) error

Register registers in bootstrap service

Types

type Config

type Config struct {
	// TemplateToken is token of the template the client is registering to
	TemplateToken string

	// TemplateName is the name of the boostrap template
	// it can be passed instead of template token to
	// auto register servers
	TemplateName string

	Scheme string

	Mode string

	// Addr is the address of the registation endpoint
	Addr string

	// ClientID is the unique client identifier
	// it can be supplied or generated by the client
	// to perform auto registration
	ClientID string

	// ClientIP is the ip at which client is reachable
	ClientIP string

	// Name of the client
	// can be part of the supplied client config or
	// generated by the client to perform auto registration
	Name string

	// PEM encoded private key used to generate
	// CSR for client registration
	// If not set private key is generated before registation
	// which can be accessed from config
	PrivateKey []byte

	// CSR is the certificate signing request
	// this is auto generated based on the PrivateKey and Token
	CSR []byte

	// Certificate is the certificate signed certificate
	// returned by bootstrap service after successful registration
	Certificate []byte

	// CACertificate is the CA Certificate of the Issuer returned by
	// the bootstrap service after successful registration
	CACertificate []byte

	// ServerHost is the host the server
	ServerHost string

	// ServerPort is port the registered server should listen on
	// it is returned after registration
	ServerPort int32

	// Fingerprint is the unique identifier of the target cluster
	// Currently it is the uid of default namespace that is created
	Fingerprint string
}

Config is the config used for client registration

Jump to

Keyboard shortcuts

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