discoverk8s

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildWithOption

func BuildWithOption(info meta.ServiceInfo, log *blog.Logger, cli *bk8s.Client, ps module.IPubsub, opts ...Option) module.IDiscover

Types

type Option

type Option func(*Parm)

Option consul discover config wrapper

func WithBlacklist

func WithBlacklist(lst []string) Option

func WithNamespace

func WithNamespace(ns string) Option

func WithSelectorTag

func WithSelectorTag(tag string) Option

func WithServicePortPairs

func WithServicePortPairs(pairs []ServicePortPair) Option

用于描述服务开放的端口号

func WithSyncServiceInterval

func WithSyncServiceInterval(interval time.Duration) Option

WithSyncServiceInterval 修改config中的interval

type Parm

type Parm struct {
	// 同步节点信息间隔
	SyncServicesInterval time.Duration

	Namespace string
	Tag       string

	ServicePortLst []ServicePortPair

	Blacklist []string
}

type ServicePortPair

type ServicePortPair struct {
	Name string
	Port int
}

Jump to

Keyboard shortcuts

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