Documentation ¶
Index ¶
Constants ¶
View Source
const ( Username = "orchestrion" NoPassword = "" // We only use account management to have access to system events, not for security. )
View Source
const (
EnvVarJobserverURL = "ORCHESTRION_JOBSERVER_URL"
)
Variables ¶
View Source
var (
ErrNoServerAvailable = errors.New("no job server is available")
)
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func FromEnvironment ¶
FromEnvironment returns a client connected to the current environment's job server, using the following process:
- If the ORCHESTRION_JOBSERVER_URL environment variable is set, a client connected to this URL is returned.
- Otherwise, if workDir is not empty, a server will be identified based on a `.orchestrion-jobserver` file; or a new server will be started using that url file, and a connection will be established to it. The started job server will automatically shut itself down once it no longer has any active client for a period of time.
- Otherwise, the ErrNoServerAvailable error is returned.
Click to show internal directories.
Click to hide internal directories.