domain

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Boot

func Boot(ctx context.Context) (<-chan struct{}, error)

Prepares domain layer

Types

type BootParam added in v0.1.7

type BootParam string
const (
	BootSagaServiceConfig BootParam = "sagaServiceConfig"

	BootLog BootParam = "log"
	BootPub BootParam = "pub"
	BootSub BootParam = "sub"
)

type EntrypointDto

type EntrypointDto struct {
	Msg  string `yaml:"msg" json:"msg"`
	Bus  string `yaml:"bus" json:"bus"`
	Step string `yaml:"step" json:"step"`
}

type OperationDto

type OperationDto struct {
	Name   string `yaml:"name,omitempty" json:"name,omitempty"`
	Bus    string `yaml:"bus" json:"bus"`
	OnDone string `yaml:"onDone" json:"onDone,omitempty"`
	OnFail string `yaml:"onFail" json:"onFail,omitempty"`
}

type SagaDto

type SagaDto struct {
	Kind        string          `yaml:"kind" json:"-"`
	Id          string          `yaml:"id" json:"id"`
	Name        string          `yaml:"name,omitempty" json:"name,omitempty"`
	Bus         string          `yaml:"bus" json:"bus"`
	Timeout     string          `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	Entrypoints []EntrypointDto `yaml:"entrypoints" json:"entrypoints,omitempty"`
	Steps       []StepDto       `yaml:"steps" json:"steps,omitempty"`
}

type SagaServiceConfig added in v0.1.1

type SagaServiceConfig struct {
	Dir string `config:"sagas-dir,required"`
	Ext string `config:"sagas-ext,required"`
}

type Service

type Service interface {
	Register(dto SagaDto) error
}

func GetSagaService

func GetSagaService() Service

type StepDto

type StepDto struct {
	Id         string         `yaml:"id" json:"id"`
	Name       string         `yaml:"name,omitempty" json:"name,omitempty"`
	Timeout    string         `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	Skip       []string       `yaml:"skip,omitempty" json:"skip,omitempty"`
	Operations []OperationDto `yaml:"operations" json:"operations"`
	After      string         `yaml:"after" json:"after,omitempty"`
}

Jump to

Keyboard shortcuts

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