consul

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

README

Fiber consul

Consul config and discovery implementation for fiber.

License

Copyright (C) 2019 Anbillon Team (anbillonteam@gmail.com)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseProperty

type BaseProperty struct {
	Address       string `fiber:"address"`
	Timeout       string `fiber:"timeout"`
	TLSSkipVerify bool   `fiber:"tls-skip-verify"`
}

BaseProperty defines the property of fiber.consul section in yaml config.

func (*BaseProperty) Prefix

func (*BaseProperty) Prefix() string

type ConfigProperty

type ConfigProperty struct {
	Enabled    bool   `fiber:"enabled"`
	ConfPrefix string `fiber:"prefix"`
	Format     string `fiber:"format"`
	Name       string `fiber:"name"`
}

ConfigProperty defines the property of fiber.consul.config section in yaml config. This will be used to configure consul config server.

func (*ConfigProperty) Prefix

func (p *ConfigProperty) Prefix() string

type DiscoveryProperty

type DiscoveryProperty struct {
	Enabled             bool     `fiber:"enabled"`
	ServiceName         string   `fiber:"service-name"`
	ServiceId           string   `fiber:"service-id"`
	PreferIpAddress     bool     `fiber:"prefer-ip-address"`
	IpAddress           string   `fiber:"ip-address"`
	Port                int      `fiber:"port"`
	HealthCheckUrl      string   `fiber:"health-check-url"`
	HealthCheckInterval string   `fiber:"health-check-interval"`
	Tags                []string `fiber:"tags"`
}

DiscoveryProperty defines the property of fiber.consul.discovery section in yaml config.

func (*DiscoveryProperty) Prefix

func (*DiscoveryProperty) Prefix() string

Jump to

Keyboard shortcuts

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