microservice

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: MIT Imports: 18 Imported by: 0

README

micro-service

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConsulClient *api.Client

ConsulClient - client for consul (if it is using)

Functions

func BlockExit added in v1.0.2

func BlockExit(callback BlockExitEndCallback)

BlockExit - block exit (daemon mode)

func InitService added in v1.0.14

func InitService(appName string, settingsInst interface{}, initFunction InitFunction, service ConsulService, version string)

func ServiceSettings

func ServiceSettings(creator settings.WatcherSettingsCreator, service ConsulService) (result *settings.Configuration, err error)

ServiceSettings - setup micro-service configuration

Types

type BlockExitEndCallback added in v1.0.2

type BlockExitEndCallback func()

BlockExitEndCallback - callback function

type ConsulService added in v1.0.4

type ConsulService interface {
	Init(config settings.Configuration)
	GetServiceInfo() ServiceInfo
	GetServiceHealthCheck() []ServiceHealthCheck
}

ConsulService - consul service

type Env added in v1.0.12

type Env struct {
	Env string
	App string
}

type InitFunction added in v1.0.14

type InitFunction func(config *appSettings.Configuration) error

type ServiceHealthCheck added in v1.0.4

type ServiceHealthCheck struct {
	Name  string
	Notes string
	TTL   time.Duration
	Check func() error
}

ServiceHealthCheck - service health checker

type ServiceInfo added in v1.0.4

type ServiceInfo struct {
	Ports *[]int
}

ServiceInfo - service information

Jump to

Keyboard shortcuts

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