{"modulePath":"github.com/AliceO2Group/Control","version":"v1.51.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package control\n\nPackage control handles the details of control calls to the O² Control core.\n\n## Constants\n\n```go\nconst (\n\tCALL_TIMEOUT              = 55 * time.Second\n\tSPINNER_TICK              = 100 * time.Millisecond\n\tHLCONFIG_COMPONENT_PREFIX = \"COG-v1\"\n\tHLCONFIG_PATH_PREFIX      = \"consul://o2/runtime/\"\n)\n```\n\n## Functions\n\n```go\nfunc AddRepo(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) error\n```\nAddRepo add a new repository to the available git repositories used for configuration and checks it out.\n\n```go\nfunc CleanTasks(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\n\n```go\nfunc ControlEnvironment(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\n\n```go\nfunc CreateEnvironment(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\n\n```go\nfunc DestroyEnvironment(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\n\n```go\nfunc GetEnvironments(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\n\n```go\nfunc GetInfo(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\n\n```go\nfunc GetTasks(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\n\n```go\nfunc ListRepos(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\nListRepos lists all available git repositories that are used for configuration.\n\n```go\nfunc ListWorkflowTemplates(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\nListWorkflowTemplates lists the available workflow templates and the git repo on which they reside.\n\n```go\nfunc ModifyEnvironment(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\n\n```go\nfunc QueryRoles(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\n\n```go\nfunc RefreshRepos(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\nRefreshRepos runs the equivalent of git pull origin/master for all available repositories.\n\n```go\nfunc RemoveRepo(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\nRemoveRepo removes a git repository based on the indexes reported by ListRepos. If the default repository is removed, the repository with the lowest index is set as the new default. If all repositories are removed, the backend (consul or file) record of the default repository is updated to the relevant viper entry.\n\n```go\nfunc SetDefaultRepo(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) error\n```\nSetDefaultRepo selects the default repository based on the indexes reported by ListRepos. It also updates the backend (consul or file) which holds a record for the default repository which is persistent across core executions.\n\n```go\nfunc SetDefaultRevision(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) error\n```\nSetDefaultRevision selects the default repository revision. This can be done on the global or on the repository level.\n\n```go\nfunc ShowEnvironment(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\n\n```go\nfunc Teardown(cxt context.Context, rpc *coconut.RpcClient, cmd *cobra.Command, args []string, o io.Writer) (err error)\n```\n\n## Types\n\n```go\ntype ConfigurationPayload struct {\n\tName       string            `json:\"name\"`\n\tWorkflow   string            `json:\"workflow\"`\n\tRevision   string            `json:\"revision\"`\n\tRepository string            `json:\"repository\"`\n\tVars       map[string]string `json:\"variables\"`\n\tDetectors  []string          `json:\"detectors\"`\n}\n```\n\n```go\ntype ControlCall func(context.Context, *coconut.RpcClient, *cobra.Command, []string, io.Writer) error\n```\n\n```go\ntype RunFunc func(*cobra.Command, []string)\n```\n\n```go\nfunc WrapCall(call ControlCall) RunFunc\n```\n\n","path":"github.com/AliceO2Group/Control/coconut/control","name":"control","synopsis":"Package control handles the details of control calls to the O² Control core.","isRedistributable":true}
