feign

package module
v0.0.0-...-ab0d149 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

View Source
const (
	LevelDebug = 1
	LevelInfo  = 2
	LevelError = 3
)
View Source
const (
	DEFAULT_REFRESH_APP_URLS_INTERVALS = 30
)

Variables

View Source
var DefaultFeign = &Feign{
	discoveryClient: eureka.DefaultClient,
	appUrls:         make(map[string][]string),
	appNextUrlIndex: make(map[string]*uint32),
}

Functions

func SetLogger

func SetLogger(logFunc LogFunc)

Types

type Feign

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

func (*Feign) App

func (t *Feign) App(app string) *resty.Client

return resty.Client

func (*Feign) GetAppUrls

func (t *Feign) GetAppUrls(app string) ([]string, bool)

get app's urls

func (*Feign) SetRefreshAppUrlsIntervals

func (t *Feign) SetRefreshAppUrlsIntervals(intervals int)

func (*Feign) UseDiscoveryClient

func (t *Feign) UseDiscoveryClient(client eureka.DiscoveryClient) *Feign

use discovery client to get all registry app => instances

func (*Feign) UseUrls

func (t *Feign) UseUrls(appUrls map[string][]string) *Feign

assign static app => urls

type Lbc

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

Feign load balance client

type LogFunc

type LogFunc func(level int, format string, a ...interface{})

func (LogFunc) Debugf

func (t LogFunc) Debugf(format string, a ...interface{})

func (LogFunc) Errorf

func (t LogFunc) Errorf(format string, a ...interface{})

func (LogFunc) Infof

func (t LogFunc) Infof(format string, a ...interface{})

Jump to

Keyboard shortcuts

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