iconfigcon

package module
v0.0.0-...-41d912c Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2019 License: MIT Imports: 11 Imported by: 0

README

airs-iconfigcon

Implementation of iconfigcon using consul

Documentation

Index

Constants

View Source
const (
	DefaultConsulHost = "127.0.0.1"
	DefaultConsulPort = 8500
)

Variables

This section is empty.

Functions

func Declare

func Declare(service Service)

Declare s.e.

Types

type ConsulEntry

type ConsulEntry struct {
	// Key is the name of the key. It is also part of the URL path when accessed
	// via the API.
	Key string

	// CreateIndex holds the index corresponding the creation of this KVPair. This
	// is a read-only field.
	CreateIndex uint64

	// ModifyIndex is used for the Check-And-Set operations and can also be fed
	// back into the WaitIndex of the QueryOptions in order to perform blocking
	// queries.
	ModifyIndex uint64

	// LockIndex holds the index corresponding to a lock on this key, if any. This
	// is a read-only field.
	LockIndex uint64

	// Flags are any user-defined flags on the key. It is up to the implementer
	// to check these values, since Consul does not treat them specially.
	Flags uint64

	// Value is the value for the key. This can be any value, but it will be
	// base64 encoded upon transport.
	Value []byte

	// Session is a string representing the ID of the session. Any other
	// interactions with this key over the same session must specify the same
	// session ID.
	Session string
}

KVPair is used to represent a single K/V entry

type Service

type Service struct {
	Host string
	Port uint16
}

func (*Service) Start

func (s *Service) Start(ctx context.Context) (context.Context, error)

Start s.e.

func (*Service) Stop

func (s *Service) Stop(ctx context.Context)

Stop s.e.

Jump to

Keyboard shortcuts

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