Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { // Name is the application name Name string `json:"name"` // Version is the application version Version string `json:"version"` // Created is the application creation timestamp Created time.Time `json:"created"` // SizeBytes is the application size in bytes SizeBytes int64 `json:"sizeBytes"` // Description is the image description Description string `json:"description"` // Type is the image type, for example application or cluster Type string `json:"type"` }
App represents a single application item in the hub
type Config ¶
type Config struct { // Bucket is the S3 bucket name Bucket string // Prefix is the S3 path prefix Prefix string // Region is the S3 region Region string // FieldLogger is used for logging logrus.FieldLogger // S3 is optional S3 API client S3 s3iface.S3API }
Config is the S3-backed hub configuration
func (*Config) CheckAndSetDefaults ¶
CheckAndSetDefaults validates config and sets defaults
type Hub ¶
type Hub interface { // List returns a list of applications in the hub List(withPrereleases bool) ([]App, error) // Download downloads the specified application installer into provided file Download(*os.File, loc.Locator) error // Get returns application installer tarball of the specified version Get(loc.Locator) (io.ReadCloser, error) // GetLatestVersion returns latest version of the specified application GetLatestVersion(name string) (string, error) }
Hub defines an interface for the hub that stores Telekube application installers
The current hub implementation is backed by S3 and all application installers are stored in the bucket of the following structure:
hub.gravitational.io ∟ gravity
∟ oss ∟ index.yaml ∟ app ∟ telekube ∟ 5.2.0 ∟ linux ∟ x86_64 ∟ telekube-5.2.0-linux-x86_64.tar ∟ telekube-5.2.0-linux-x86_64.tar.sha256 ∟ latest: // same as versioned sub-bucket ∟ stable: // same as versioned sub-bucket
The index file, index.yaml, provides information about installers stored in the bucket and is updated every time a new version is published. The index file format is the same as Helm's chart repository index file.
type S3Hub ¶
type S3Hub struct {
// contains filtered or unexported fields
}
S3Hub is the S3-backed hub implementation
func (*S3Hub) GetLatestVersion ¶
GetLatestVersion returns the latest version of the specified application in the hub