consulcli

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package consulcli is connecting to the consul service client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(addr string, opts ...Option) (*api.Client, error)

Init connecting to the consul service Note: If the WithConfig(*api.Config) parameter is set, the addr parameter is ignored!

Types

type Option

type Option func(*options)

Option set the consul client options.

func WithConfig

func WithConfig(c *api.Config) Option

WithConfig set consul config

func WithDatacenter

func WithDatacenter(datacenter string) Option

WithDatacenter set datacenter

func WithScheme

func WithScheme(scheme string) Option

WithScheme set scheme

func WithToken

func WithToken(token string) Option

WithToken set token

func WithWaitTime

func WithWaitTime(waitTime time.Duration) Option

WithWaitTime set wait time

Jump to

Keyboard shortcuts

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