base

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package base implements invoker for the manipulation of cluster strategy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoadBalance

func GetLoadBalance(invoker protocol.Invoker, methodName string) loadbalance.LoadBalance

Types

type BaseClusterInvoker

type BaseClusterInvoker struct {
	Directory      directory.Directory
	AvailableCheck bool
	Destroyed      *atomic.Bool
	StickyInvoker  protocol.Invoker
}

func NewBaseClusterInvoker

func NewBaseClusterInvoker(directory directory.Directory) BaseClusterInvoker

func (*BaseClusterInvoker) CheckInvokers

func (invoker *BaseClusterInvoker) CheckInvokers(invokers []protocol.Invoker, invocation protocol.Invocation) error

CheckInvokers checks invokers' status if is available or not

func (*BaseClusterInvoker) CheckWhetherDestroyed

func (invoker *BaseClusterInvoker) CheckWhetherDestroyed() error

CheckWhetherDestroyed checks if cluster invoker was destroyed or not

func (*BaseClusterInvoker) Destroy

func (invoker *BaseClusterInvoker) Destroy()

func (*BaseClusterInvoker) DoSelect

func (invoker *BaseClusterInvoker) DoSelect(lb loadbalance.LoadBalance, invocation protocol.Invocation, invokers []protocol.Invoker, invoked []protocol.Invoker) protocol.Invoker

func (*BaseClusterInvoker) GetURL

func (invoker *BaseClusterInvoker) GetURL() *common.URL

func (*BaseClusterInvoker) IsAvailable

func (invoker *BaseClusterInvoker) IsAvailable() bool

Jump to

Keyboard shortcuts

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