activation

package
v0.0.0-...-2a50bf3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package activation contains functionalities for activating sql server client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentStatus

type AgentStatus interface {
	Activate(s wlm.WorkloadManagerService, path, name, projectID, instance, instancID string) (bool, error)
	IsAgentActive(path string) bool
}

AgentStatus interface.

type MockAgentStatus

type MockAgentStatus struct {
	MockActivateError            bool
	MockIsAgentActiveReturnValue bool
	MockActivateResult           bool
}

MockAgentStatus mocks agentstatus for testing usage.

func (*MockAgentStatus) Activate

func (m *MockAgentStatus) Activate(s wlm.WorkloadManagerService, path, name, projectID, instance, instancID string) (bool, error)

Activate mock function.

func (*MockAgentStatus) IsAgentActive

func (m *MockAgentStatus) IsAgentActive(path string) bool

IsAgentActive mock function.

type Status

type Status int

Status defines new type indicating agent status.

const (
	// Installed indicates the agent is in Installed status.
	Installed Status = iota
	// Activated indicates the agent is in Activated status.
	Activated
)

type V1

type V1 struct {
	Status Status
}

V1 is the agent current status. Default status is Installed.

func NewV1

func NewV1() *V1

NewV1 returns AgentStatus with default status "Installed".

func (*V1) Activate

func (a *V1) Activate(s wlm.WorkloadManagerService, path, name, projectID, instance, instancID string) (bool, error)

Activate the agent. Return true if the activation succeed. Also returns true with error if file persistence failed. Otherwise return false.

func (*V1) IsAgentActive

func (a *V1) IsAgentActive(path string) bool

IsAgentActive returns the agent activation status. Return true if the agent is activated. False if the agent is inactive.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL