microservice

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: EPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandExamples

func CommandExamples() string

CommandExamples returns ms command examples for Cobra.

func CommandLong

func CommandLong() string

CommandLong returns the ms command group introduction.

func Exec

func Exec(c *client.Client, id string, command []string) error

Exec runs a command inside a microservice via EdgeletAPI exec session.

func FetchLogs

func FetchLogs(ctx *run.CLIContext, api client.EdgeletAPI, id string, opts logs.Options) error

FetchLogs retrieves buffered microservice logs.

func KillCommandLong

func KillCommandLong() string

KillCommandLong returns help for ms kill.

func ParseExecArgs

func ParseExecArgs(args []string) (id string, command []string, err error)

ParseExecArgs validates ms exec positional args.

func ParseExecCommand

func ParseExecCommand(args []string) ([]string, error)

ParseExecCommand extracts the remote command from ms exec args after the id. When Cobra parses "exec <id> -- cmd...", it strips "--" before RunE, so any remaining positional tokens are treated as the command.

func RemoveCommandLong

func RemoveCommandLong() string

RemoveCommandLong returns help for ms rm.

func StreamLogs

func StreamLogs(ctx *run.CLIContext, c *client.Client, id string, opts logs.Options) error

StreamLogs follows microservice logs over WebSocket.

Types

type LifecycleResult

type LifecycleResult struct {
	Human string
	Data  map[string]any
	Path  string
}

LifecycleResult carries a microservice lifecycle operation outcome.

func Kill

func Kill(client run.EdgeletAPIClient, id string) (*LifecycleResult, error)

Kill kills a microservice.

func Remove

func Remove(client run.EdgeletAPIClient, id string) (*LifecycleResult, error)

Remove deletes a microservice.

func Restart

func Restart(client run.EdgeletAPIClient, id string) (*LifecycleResult, error)

Restart restarts a microservice.

func Start

func Start(client run.EdgeletAPIClient, id string) (*LifecycleResult, error)

Start starts a microservice.

func Stop

func Stop(client run.EdgeletAPIClient, id string) (*LifecycleResult, error)

Stop stops a microservice.

Jump to

Keyboard shortcuts

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