gxpool

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package gxpool provides a service pool filter

Package gxpool provides a interface for service pool filter

Index

Constants

View Source
const (
	GxfilterDefaultKey     = 0X201804201515
	GxfilterServiceAttrKey = 0X201808162038
)

Variables

This section is empty.

Functions

func NewFilter

func NewFilter(opts ...gxfilter.Option) (gxfilter.Filter, error)

func WithTTL

func WithTTL(t time.Duration) gxfilter.Option

Types

type Filter

type Filter struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Filter) CheckServiceAlive added in v0.3.1

func (s *Filter) CheckServiceAlive(attr gxregistry.ServiceAttr, svcArray *gxfilter.ServiceArray) bool

func (*Filter) Close

func (s *Filter) Close() error

func (*Filter) Filter

func (s *Filter) Filter(service gxregistry.ServiceAttr) (*gxfilter.ServiceArray, error)

func (*Filter) GetService

func (s *Filter) GetService(service gxregistry.ServiceAttr) ([]*gxregistry.Service, error)

func (*Filter) Options

func (s *Filter) Options() gxfilter.Options

Jump to

Keyboard shortcuts

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