Documentation
¶
Index ¶
Constants ¶
const ( // KeldaDemoContext is the name of the context that connect to the // Kelda-maintained demo cluster. If this context is set, the user's local // kubeconfig is ignored. KeldaDemoContext = "kelda-demo-cluster" // UserConfigPath is the default path to the Kelda user config. UserConfigPath = "~/.kelda.yaml" // InitialUserConfigVersion is the first version of the Kelda // user config. Config files that do not specify a version // will default to this version. InitialUserConfigVersion = "v1alpha1" // SupportedUserConfigVersion is the supported version of the // Kelda user config of the current Kelda binary. SupportedUserConfigVersion = "v1alpha1" )
const InitialSyncConfigVersion = "v1alpha1"
InitialSyncConfigVersion is the first version of the Kelda sync config. Config files that do not specify a version will default to this version.
const InitialWorkspaceConfigVersion = "v1alpha1"
InitialWorkspaceConfigVersion is the first version of the Kelda workspace config. Config files that do not specify a version will default to this version.
const SupportedSyncConfigVersion = "v1alpha1"
SupportedSyncConfigVersion is the supported version of the Kelda sync config of the current Kelda binary.
const SupportedWorkspaceConfigVersion = "v1alpha1"
SupportedWorkspaceConfigVersion is the supported version of the Kelda workspace config of the current Kelda binary.
Variables ¶
var ( // SupportedLicenseVersion is the supported version of the license // configuration. SupportedLicenseVersion = "v1alpha2" )
Functions ¶
func GetUserConfigPath ¶
Get the path to the user's global Kelda configuration. This path is expanded, so it can be directly passed to file operations.
Types ¶
type License ¶
type License struct { // The version of the license format. Version string // The terms of the license. Terms Terms // Whether the license was properly signed. Signed bool }
License contains the configuration required to grant a user access to use Kelda. Access is gated on the number of seats purchased and an expiry time.
func ParseLicense ¶
ParseLicense parses the license with the given contents. It expects licenses generated by License.Marshal.
func (License) CheckExpiration ¶
CheckExpiration checks that the license has not expired.
func (License) CheckSeats ¶
CheckSeats checks the customer is using a permissible number of seats.
type LicenseType ¶
type LicenseType int
LicenseType is the type of the license, currently just "trial" or "customer"
const ( // Customer is a LicenseType indicating the license is for a signed-and-paid customer Customer LicenseType = 0 // Trial is a LicenseType indicating a license for a client desiring a free trial Trial LicenseType = 1 )
type Service ¶
type Service struct { Name string `json:"name,omitempty"` Script []string `json:"script"` Manifests []string `json:"manifests,omitempty"` }
Service contains the configuration required to boot a Microservice.
func (Service) GetDevCommand ¶
type SyncConfig ¶
type SyncConfig struct { Version string `json:"version,omitempty"` Name string `json:"name"` // Required. Sync []SyncRule `json:"sync,omitempty"` Command []string `json:"command,omitempty"` InitCommand []string `json:"initCommand,omitempty"` Image string `json:"image,omitempty"` // contains filtered or unexported fields }
SyncConfig contains the configuration that specifies how a service should be run when it's in development mode.
func ParseSyncConfig ¶
func ParseSyncConfig(path string) (SyncConfig, error)
ParseSyncConfig parses the service configuration for `name` in the directory `path`.
func (SyncConfig) GetPath ¶
func (c SyncConfig) GetPath() string
GetPath returns the filepath that the service was parsed from. A getter method is used rather than making the field public so that it can't get set by the yaml Unmarshalling.
func (SyncConfig) GetSyncConfigProto ¶
func (c SyncConfig) GetSyncConfigProto() (syncConfig dev.SyncConfig)
GetSyncConfigProto returns the sync configuration as the protobuf type.
type SyncRule ¶
type SyncRule struct { From string `json:"from"` To string `json:"to"` Except []string `json:"except"` TriggerInit bool `json:"triggerInit"` }
SyncRule defines how to sync files from the local machine into the development container.
type Terms ¶
type Terms struct { Customer string // the name of the customer Type LicenseType // what type of license it is Seats int // how many seats the customer purchased ExpiryTime time.Time // when the license expires }
Terms contains the actionable terms of the license
type Tunnel ¶
type Tunnel struct { ServiceName string `json:"serviceName"` // Required. LocalPort uint32 `json:"localPort"` // Required. RemotePort uint32 `json:"remotePort"` // Required. }
Tunnel defines a desired tunnel between a local port and a service in the development environment.
type User ¶
type User struct { Version string `json:"version,omitempty"` Namespace string `json:"namespace"` Context string `json:"context"` Workspace string `json:"workspace"` }
User contains configuration used to identify the user.
type Workspace ¶
type Workspace struct { Version string `json:"version,omitempty"` Services []Service `json:"services"` // Required. Tunnels []Tunnel `json:"tunnels"` Ignore []string `json:"ignore"` // contains filtered or unexported fields }
Workspace contains the main development environment configuration.
func ParseWorkspace ¶
ParseWorkspace parses the config file at `cfgPath`.