exec

package
v0.0.0-...-a6c2dd6 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: AGPL-3.0 Imports: 40 Imported by: 1

Documentation

Overview

Package exec is for the exec worker, which covers both konnector and service execution.

Index

Constants

View Source
const MaxPayloadSizeInEnvVar = 100000

MaxPayloadSizeInEnvVar is the maximal size that the COZY_PAYLOAD env variable can be. If the payload is larger, we can't put it in the env variable as the kernel as a limit for it. Instead, we put the payload in a temporary file and only gives the filename in the COZY_PAYLOAD variable.

Variables

This section is empty.

Functions

func CreateCmd

func CreateCmd(cmdStr, workDir string) *exec.Cmd

CreateCmd creates an exec.Cmd.

func KillCmd

func KillCmd(c *exec.Cmd) error

KillCmd sends a KILL signal to the command.

Types

type KonnectorMessage

type KonnectorMessage struct {
	Account        string `json:"account"`        // Account is the identifier of the account
	Konnector      string `json:"konnector"`      // Konnector is the slug of the konnector
	FolderToSave   string `json:"folder_to_save"` // FolderToSave is the identifier of the folder
	BIWebhook      bool   `json:"bi_webhook,omitempty"`
	AccountDeleted bool   `json:"account_deleted,omitempty"`
	// contains filtered or unexported fields
}

KonnectorMessage is the message structure sent to the konnector worker.

func (*KonnectorMessage) ToJSON

func (m *KonnectorMessage) ToJSON() string

ToJSON returns a JSON reprensation of the KonnectorMessage

type ServiceOptions

type ServiceOptions struct {
	Slug   string          `json:"slug"`   // The application slug
	Name   string          `json:"name"`   // The service name
	Fields json.RawMessage `json:"fields"` // Custom fields
	File   string          `json:"service_file"`

	Message *ServiceOptions `json:"message"`
}

ServiceOptions contains the options to execute a service.

Jump to

Keyboard shortcuts

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