nats

package module
v0.0.0-...-5ead8e8 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: Apache-2.0 Imports: 8 Imported by: 2

README

Форк модуля github.com/micro/go-plugins/registry/nats/v2@v2.9.1

C подстановкой пакета-декоратора json, который анмаршалит в структуры nats registry из старой версии микры (с портом), преобразуя результат в структуру этого модуля. Тем самым достигается видимость портов микросервисов, работающих на старой микре.

Documentation

Overview

Package nats provides a NATS registry using broadcast queries

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultQuorum = 0
)

Functions

func NewRegistry

func NewRegistry(opts ...registry.Option) registry.Registry

func Options

func Options(nopts nats.Options) registry.Option

Options allow to inject a nats.Options struct for configuring the nats connection

func QueryTopic

func QueryTopic(s string) registry.Option

QueryTopic allows to set a custom nats topic on which service registries query (survey) other services. All registries listen on this topic and then respond to the query message.

func Quorum

func Quorum(n int) registry.Option

func WatchTopic

func WatchTopic(s string) registry.Option

WatchTopic allows to set a custom nats topic on which registries broadcast changes (e.g. when services are added, updated or removed). Since we don't have a central registry service, each service typically broadcasts in a determined frequency on this topic.

Types

This section is empty.

Directories

Path Synopsis
example module

Jump to

Keyboard shortcuts

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