config

package
v1.12.0-beta Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Overview

Package config provides configurations for cascading zippers.

Index

Constants

This section is empty.

Variables

View Source
var ErrWorkflowConfigExt = errors.New(`workflow: the extension of workflow config is incorrect, it should ".yaml|.yml"`)

ErrWorkflowConfigExt represents the extension of workflow config is incorrect.

Functions

This section is empty.

Types

type App

type App struct {
	Name string `yaml:"name"`
}

App represents a YoMo Application.

type MeshZipper

type MeshZipper struct {
	Name       string `json:"name"`
	Host       string `json:"host"`
	Port       int    `json:"port"`
	Credential string `json:"credential,omitempty"`
}

MeshZipper describes mesh configurations.

type Workflow

type Workflow struct {
	Functions []App `yaml:"functions"`
}

Workflow represents a YoMo Workflow.

type WorkflowConfig

type WorkflowConfig struct {
	// Name represents the name of the zipper.
	Name string `yaml:"name"`
	// Host represents the listening host of the zipper.
	Host string `yaml:"host"`
	// Port represents the listening port of the zipper.
	Port int `yaml:"port"`
	// Workflow represents the sfn workflow.
	Workflow `yaml:",inline"`
}

WorkflowConfig represents a YoMo Workflow config.

func LoadWorkflowConfig

func LoadWorkflowConfig(path string) (*WorkflowConfig, error)

LoadWorkflowConfig the WorkflowConfig by path.

func ParseWorkflowConfig

func ParseWorkflowConfig(config string) (*WorkflowConfig, error)

ParseWorkflowConfig parses the config.

Jump to

Keyboard shortcuts

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