Versions in this module Expand all Collapse all v0 v0.0.1 Jan 1, 2026 Changes in this version + func ExampleStackUpExecute_Base64() + func ExampleStackUpExecute_MultipleCommands() + func ExampleStackUpExecute_WithLocalDataPath() + func ExampleStackUpExecute_WithScript() + func ExampleStackUpExecute_YAML() + type AsyncExecuteClient struct + func NewAsyncExecuteClient(config *AsyncExecuteClientConfig) *AsyncExecuteClient + func (c *AsyncExecuteClient) AsyncExecute(ctx context.Context, req *AsyncExecuteRequest) (*AsyncExecuteResponse, error) + func (c *AsyncExecuteClient) GetResult(ctx context.Context, taskIDs []string, onlyCurrentController bool) (*GetResultResponse, error) + func (c *AsyncExecuteClient) GetSingleResult(ctx context.Context, taskID string, onlyCurrentController bool) (*AsyncTaskResult, error) + func (c *AsyncExecuteClient) StackUpExecute(ctx context.Context, req *StackUpExecuteRequest) (*StackUpExecuteResponse, error) + func (c *AsyncExecuteClient) SyncExecute(ctx context.Context, req *AsyncExecuteRequest, opts *SyncExecuteOptions) (*AsyncTaskResult, error) + type AsyncExecuteClientConfig struct + BaseURL string + DefaultTimeout time.Duration + HTTPClient *http.Client + MaxPollAttempts int + MaxPollDuration time.Duration + PollInterval time.Duration + func DefaultAsyncExecuteClientConfig(baseURL string) *AsyncExecuteClientConfig + type AsyncExecuteRequest struct + Background bool + Commands []string + ID string + RemoteInfo structs.L2DeviceRemoteInfo + Script string + ScriptPath string + Timeout int + type AsyncExecuteResponse struct + Message string + Status string + Success bool + TaskID string + TaskInfo TaskInfo + type AsyncTaskResult struct + Duration *int64 + EndTime *time.Time + Error *ErrorDetail + Message string + Result *ExecutionResult + StartTime time.Time + Status TaskStatus + TaskInfo TaskInfo + func (r *AsyncTaskResult) GetCombinedError() string + func (r *AsyncTaskResult) GetCombinedOutput() string + func (r *AsyncTaskResult) IsSuccess() bool + type Client struct + func NewClient(address, username, password string) *Client + func (c *Client) CreateDeployment(req models.DeploymentRequest) (*models.Deployment, error) + func (c *Client) GetControllerStatus() (*models.ControllerStatus, error) + func (c *Client) GetDeployment(deploymentID string) (*models.Deployment, error) + func (c *Client) GetPackageLogs(agentCode, packageName string, count int) ([]string, error) + func (c *Client) ListAgents(filter map[string]string, page, pageSize int) (*models.AgentsResponse, error) + func (c *Client) ListDeployments() ([]models.Deployment, error) + func (c *Client) StartPackage(agentCode, packageName string) error + func (c *Client) StopPackage(agentCode, packageName string) error + type CommandResult struct + Command string + Duration int64 + Error string + ExecutedAt time.Time + ExitCode int + Index int + Stderr string + Stdout string + Success bool + type ConfigDriver struct + EtcdEndpoints []string + EtcdPassword string + EtcdUsername string + func NewConfigDriver(base, area string, endpoints []string) *ConfigDriver + func NewConfigDriverWithAuth(base, area string, endpoints []string, username, password string) *ConfigDriver + func (cd *ConfigDriver) Enable(ctx context.Context, enable bool, paths ...string) error + func (cd *ConfigDriver) GetConfig(ctx context.Context, paths ...string) (map[string]interface{}, error) + func (cd *ConfigDriver) PutConfig(ctx context.Context, value interface{}, paths ...string) error + type ErrorDetail struct + Code string + Details string + Message string + Type ErrorType + type ErrorType string + const ErrorTypeAuthentication + const ErrorTypeCancelled + const ErrorTypeExecution + const ErrorTypeNetwork + const ErrorTypeNone + const ErrorTypeTimeout + const ErrorTypeUnknown + type ExecutionResult struct + CommandResults []CommandResult + ExitCode int + OutputSize int64 + Stderr string + Stdout string + type GetResultRequest struct + OnlyCurrentController bool + TaskIDs []string + type GetResultResponse struct + Errors map[string]string + Results map[string]*AsyncTaskResult + type StackUpCommandResult struct + Command string + Index int + Key string + Msg string + Output string + Status string + type StackUpExecuteRequest struct + Config string + ConfigType string + LocalDataPath string + RemoteInfo structs.L2DeviceRemoteInfo + type StackUpExecuteResponse struct + Error string + Message string + Results []StackUpCommandResult + Success bool + type SyncExecuteOptions struct + MaxPollAttempts int + MaxPollDuration time.Duration + OnStatusUpdate func(status TaskStatus, result *AsyncTaskResult) + PollInterval time.Duration + type TaskInfo struct + Background bool + CommandType string + ControllerID string + CreatedAt time.Time + DeviceIP string + DevicePort int + ID string + Timeout int + Username string + type TaskStatus string + const TaskStatusCancelled + const TaskStatusCompleted + const TaskStatusFailed + const TaskStatusPending + const TaskStatusRunning + const TaskStatusTimeout + func (s TaskStatus) IsCompleted() bool