viper

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 7 Imported by: 0

README

Check examples config in test dir or inside provider_test.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterInfo

type ClusterInfo struct {
	ReplicasetUUID string `yaml:"replicaset_uuid" mapstructure:"replicaset_uuid"`
}

type InstanceInfo

type InstanceInfo struct {
	Cluster string
	Box     struct {
		Listen       string `json:"listen,omitempty" yaml:"listen" mapstructure:"listen"`
		InstanceUUID string `yaml:"instance_uuid" mapstructure:"instance_uuid" json:"instanceUUID,omitempty"`
	}
}

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(v *srcviper.Viper) *Provider

func (*Provider) Close

func (p *Provider) Close()

func (*Provider) Init

func (*Provider) Validate

func (p *Provider) Validate() error

func (*Provider) WatchChanges

func (p *Provider) WatchChanges() *Provider

type SourceTopologyConfig

type SourceTopologyConfig struct {
	Clusters  map[string]ClusterInfo  `json:"clusters,omitempty" yaml:"clusters" `
	Instances map[string]InstanceInfo `json:"instances,omitempty" yaml:"instances"`
}

type TopologyConfig

type TopologyConfig struct {
	Topology SourceTopologyConfig `json:"topology"`
}

Jump to

Keyboard shortcuts

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