hashreleaseserver

package
v1.11.0-cni-plu...-aa3fb74 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultMax is the number of hashreleases to keep in the server
	DefaultMax = 400

	// BaseDomain is the base URL of the hashrelease
	BaseDomain = "docs.eng.tigera.net"
)

Variables

This section is empty.

Functions

func CleanOldHashreleases

func CleanOldHashreleases(cfg *Config, maxToKeep int) error

func HasHashrelease

func HasHashrelease(hash string, cfg *Config) (bool, error)

func RemoteDocsPath

func RemoteDocsPath(user string) string

func SetHashreleaseAsLatest

func SetHashreleaseAsLatest(rel Hashrelease, cfg *Config) error

SetHashreleaseAsLatest sets the hashrelease as the latest for the stream

Types

type Config

type Config struct {
	// Host is the host for the SSH connection
	Host string

	// User is the user for the SSH connection
	User string

	// Key is the path to the SSH key
	Key string

	// Port is the port for the SSH connection
	Port string

	// KnownHosts is the absolute path to the known_hosts file
	// to use for the user host key database instead of ~/.ssh/known_hosts
	KnownHosts string
}

Config holds the configuration for an SSH connection

func (*Config) Address

func (s *Config) Address() string

Address returns the address in the format host:port

func (*Config) HostString

func (s *Config) HostString() string

HostString returns the host string in the format user@host

func (*Config) RSHCommand

func (s *Config) RSHCommand() string

RSHCommand returns the ssh command for rsync to use for the connection

func (*Config) Valid

func (s *Config) Valid() bool

type Hashrelease

type Hashrelease struct {
	// Name is the name of the hashrelease.
	// When publishing a hashrelease, this is the name of the folder in the server.
	// When getting a hashrelease, this is the full path of the hashrelease folder.
	Name string

	// Hash is the hash of the hashrelease
	Hash string

	// Note is the info about the hashrelease
	Note string

	// Stream is the version the hashrelease is for (e.g master, v3.19)
	Stream string

	// ProductVersion is the product version in the hashrelease
	ProductVersion string

	// OperatorVersion is the operator version for the hashreleaseq
	OperatorVersion string

	// Source is the source of hashrelease content
	Source string

	// Time is the modified time of the hashrelease
	Time time.Time

	// Latest is if the hashrelease is the latest for the stream
	Latest bool
}

func (*Hashrelease) URL

func (h *Hashrelease) URL() string

Jump to

Keyboard shortcuts

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