services

package
v0.0.0-...-8723fde Latest Latest
Warning

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

Go to latest
Published: May 1, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Services = map[string]Service{
	"postgresql":    Postgresql{},
	"redis":         Redis{},
	"elasticsearch": ElasticSearch{},
	"rabbitmq":      RabbitMQ{},
}

Services are built-in services.

Functions

This section is empty.

Types

type ElasticSearch

type ElasticSearch struct{}

ElasticSearch service

func (ElasticSearch) Name

func (ElasticSearch) Name() string

Name implements Service interface.

func (ElasticSearch) Parameters

func (ElasticSearch) Parameters() []string

Parameters implements Service interface.

func (ElasticSearch) Run

func (ElasticSearch) Run(parameters map[string]interface{}) error

Run implements Service interface.

type HardError

type HardError struct {
	Err error
}

func (*HardError) Error

func (e *HardError) Error() string

type Postgresql

type Postgresql struct{}

Postgresql service

func (Postgresql) Name

func (Postgresql) Name() string

Name implements Service interface.

func (Postgresql) Parameters

func (Postgresql) Parameters() []string

Parameters implements Service interface.

func (Postgresql) Run

func (Postgresql) Run(parameters map[string]interface{}) error

Run implements Service interface.

type RabbitMQ

type RabbitMQ struct{}

RabbitMQ service

func (RabbitMQ) Name

func (RabbitMQ) Name() string

Name implements Service interface.

func (RabbitMQ) Parameters

func (RabbitMQ) Parameters() []string

Parameters implements Service interface.

func (RabbitMQ) Run

func (RabbitMQ) Run(parameters map[string]interface{}) error

Run implements Service interface.

type Redis

type Redis struct{}

Redis service

func (Redis) Name

func (Redis) Name() string

Name implements Service interface

func (Redis) Parameters

func (Redis) Parameters() []string

Parameters implements Service interface

func (Redis) Run

func (Redis) Run(parameters map[string]interface{}) error

Run implements Service interface.

type Service

type Service interface {
	Run(parameters map[string]interface{}) error
	Name() string
	Parameters() []string
}

Service represents a service.

type SoftError

type SoftError struct {
	Err error
}

func (*SoftError) Error

func (e *SoftError) Error() string

Jump to

Keyboard shortcuts

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