version

package module
v0.0.0-...-b057e5c Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: MIT Imports: 5 Imported by: 1

README

Version Wrapper

The version wrapper is a stateful client wrapper which gives you a ability to select only services with specified version or with fallback version.

That suitable for easy upgrade running services without downtime.

Usage

Pass in the wrapper when you create your service

wrapper := version.NewClientWrapper("v1.0.1", "latest")

service := micro.NewService(
	micro.Name("foo"),
	micro.WrapClient(wrapper),
)

Documentation

Index

Constants

View Source
const LatestFallback = "latest"

Variables

This section is empty.

Functions

func FilterVersionWithFallback

func FilterVersionWithFallback(version string, fallback string) selector.Filter

FilterVersionWithFallback is a version based Select Filter which will only return services with the version specified or with fallback version.

func NewClientWrapper

func NewClientWrapper(version string, fallback string) client.Wrapper

NewClientWrapper is a wrapper which selects only latest versions of services

Types

This section is empty.

Jump to

Keyboard shortcuts

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