Documentation ¶
Index ¶
- func Create(spec *SessionSpec) error
- func Flush(names ...string) error
- func ForwardCreate(env map[string]string, local, remote string, labels map[string]string) error
- func ForwardTerminate(env, labels map[string]string) error
- func Install(url, installDir string) error
- func InstallMutagenOnce(binPath string) error
- func Pause(names ...string) error
- func Reset(envVars map[string]string, names ...string) error
- func Resume(envVars map[string]string, names ...string) error
- func SanitizeSessionName(input string) string
- func Terminate(env, labels map[string]string, names ...string) error
- type Endpoint
- type Forward
- type Session
- type SessionIgnore
- type SessionSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(spec *SessionSpec) error
func ForwardCreate ¶
ForwardCreate creates a new port forward using mutagen. local looks like tcp:127.0.0.1:<port> remote looks like <host>:<ssh-port>:tcp::<port> (ssh-port is usually 22)
func ForwardTerminate ¶
func InstallMutagenOnce ¶
func SanitizeSessionName ¶
SanitizeSessionName ensures the input string contains letter, number or dash runes. This matches the implementation in mutagen's codebase: https://github.com/mutagen-io/mutagen/blob/master/pkg/selection/names.go
TODO savil. Refactor SessionSpec so that this is always applied. We can make it a struct that uses a constructor, and make Sync a method on the struct.
Types ¶
type Endpoint ¶
type Endpoint struct { User string `json:"user,omitempty"` Host string `json:"host,omitempty"` Port uint16 `json:"port,omitempty"` Path string `json:"path"` Environment map[string]string `json:"environment,omitempty"` Parameters map[string]string `json:"parameters,omitempty"` Connected bool `json:"connected"` }
type Forward ¶
type Session ¶
type Session struct { Identifier string `json:"identifier"` Version uint32 `json:"version"` CreationTime string `json:"creationTime"` CreatingVersion string `json:"creatingVersion"` Alpha Endpoint `json:"alpha"` Beta Endpoint `json:"beta"` Name string `json:"name,omitempty"` Labels map[string]string `json:"labels,omitempty"` Paused bool `json:"paused"` Status string `json:"status"` }
func Sync ¶
func Sync(spec *SessionSpec) (*Session, error)
type SessionIgnore ¶
type SessionSpec ¶
type SessionSpec struct { AlphaAddress string AlphaPath string BetaAddress string BetaPath string Name string Labels map[string]string Paused bool SyncMode string Ignore SessionIgnore EnvVars map[string]string }
func (*SessionSpec) Validate ¶
func (s *SessionSpec) Validate() error
Click to show internal directories.
Click to hide internal directories.