maintenance

package
v1.1.49 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

com.plugis.maintenance cloud events

Topic : com.plugis.maintenance.B8:27:EB:E7:B3:4E

Cloud events :

  • Type : com.plugis.maintenance.start
  • parameters : {"port": 2000}
  • sample : nats pub -s 'https://nats1.plugis.com' 'com.plugis.maintenance.B8:27:EB:E7:B3:4E' '{"type": "com.plugis.maintenance.start","data": {"port": 2000}, "id": "123","source": "manual","specversion": "1.0"}'

event-sender -type 'com.plugis.maintenance.start' -data '{"port": 2000}' -topic "com.plugis.maintenance.B8:27:EB:E7:B3:4E" -request

event-sender -type 'com.plugis.maintenance.stop' -request

start maintenance

event-sender -server "nats://nats1.plugis.com:443" -type 'com.plugis.maintenance.start' -data '{"port": 2000}' -topic "com.plugis.maintenance.B8:27:EB:E7:B3:4E" -timeout 10 -request

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MaintenanceResponse

type MaintenanceResponse struct {
	Response string `json:"response,omitempty"`
	Error    error  `json:"error,omitempty"`
}

type MaintenanceService

type MaintenanceService struct {
	natsservice.NatsService
	Config MaintenanceServiceConfig
	// contains filtered or unexported fields
}

func NewMaintenanceService

func NewMaintenanceService(config MaintenanceServiceConfig, heartbeatService *heartbeat.HeartbeatSender) *MaintenanceService

NewMaintenanceService creates a new MaintenanceService

func (MaintenanceService) Run

func (svc MaintenanceService) Run(ctx context.Context, params ...interface{}) error

func (*MaintenanceService) StartMaintenance

func (svc *MaintenanceService) StartMaintenance(startParams *MaintenanceStartParams) error

type MaintenanceServiceConfig

type MaintenanceServiceConfig struct {
	SSHServer   string `json:"ssh_server"`
	SSHPort     int    `json:"ssh_port"`
	SSHUser     string `json:"ssh_user"`
	SSHPassword string `json:"ssh_password"`
	SSHKeyPath  string `json:"ssh_key_path"`
}

MaintenanceServiceConfig is the structure of the configuration for the MaintenanceService

type MaintenanceStartParams

type MaintenanceStartParams struct {
	Port int `json:"port"`
}

MaintenanceStartParams is the structure of the event com.plugis.maintenance.start

Jump to

Keyboard shortcuts

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