shell

package
v1.1.46 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

com.plugis.shell cloud events

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

Cloud events :

  • Type : com.plugis.shell.command
  • parameters : {"command": ["df","-lh","/"]}
  • sample : nats pub -s 'https://nats1.plugis.com' 'com.plugis.shell.B8:27:EB:E7:B3:4E' '{"type": "com.plugis.shell.command","data": {"command": ["df","-lh","/"]}, "id": "123","source": "manual","specversion": "1.0"}'

event-sender -type 'com.plugis.shell.command' -data '{"command": ["hostname"]}' -topic "com.plugis.shell.B8:27:EB:E7:B3:4E" -request

event-sender -type 'com.plugis.shell.command' -data '{"command": ["hostname"]}' -topic "com.plugis.shell.B8:27:EB:E7:B3:4E" -request

restart remote-access service

event-sender -server "nats://nats1.plugis.com:443" -type 'com.plugis.shell.command' -data '{"command": ["sh","-c","sudo service remote-access restart"]}' -topic "com.plugis.shell.2C:94:64:02:4C:A3" -timeout 5 -request

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShellCommandParams

type ShellCommandParams struct {
	Command  []string `json:"command"`
	Response string   `json:"response,omitempty"`
	Error    error    `json:"error,omitempty"`
}

type ShellService

type ShellService struct {
	natsservice.NatsService
}

func (ShellService) Run

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

Jump to

Keyboard shortcuts

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