metadata

package
v1.15.8 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MPL-2.0 Imports: 7 Imported by: 108

Documentation

Index

Constants

View Source
const TagACLs = "acls"

TODO(ACL-Legacy-Compat): remove in phase 2

Variables

This section is empty.

Functions

func AddFeatureFlags added in v1.8.12

func AddFeatureFlags(tags map[string]string, flags ...string)

AddFeatureFlags to the tags. The tags map is expected to be a serf.Config.Tags. The feature flags are encoded in the tags so that IsConsulServer can decode them and populate the Server.FeatureFlags map.

func Build added in v0.9.3

func Build(m *serf.Member) (*version.Version, error)

Build extracts the Consul version info for a member.

Types

type Key

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

Key is used in maps and for equality tests. A key is based on endpoints.

func (*Key) Equal

func (k *Key) Equal(x *Key) bool

Equal compares two Key objects

type Server

type Server struct {
	Name                string // <node>.<dc>
	ShortName           string // <node>
	ID                  string
	Datacenter          string
	Segment             string
	Port                int
	SegmentAddrs        map[string]string
	SegmentPorts        map[string]int
	WanJoinPort         int
	LanJoinPort         int
	ExternalGRPCPort    int
	ExternalGRPCTLSPort int
	Bootstrap           bool
	Expect              int
	Build               version.Version
	Version             int
	RaftVersion         int
	Addr                net.Addr
	Status              serf.MemberStatus
	ReadReplica         bool
	FeatureFlags        map[string]int

	// If true, use TLS when connecting to this server
	UseTLS bool
}

Server is used to return details of a consul server

func IsConsulServer

func IsConsulServer(m serf.Member) (bool, *Server)

IsConsulServer returns true if a serf member is a consul server agent. Returns a bool and a pointer to the Server.

func (*Server) Key

func (s *Server) Key() *Key

Key returns the corresponding Key

func (*Server) String

func (s *Server) String() string

String returns a string representation of Server

Jump to

Keyboard shortcuts

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