distributor

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreSliceElementsIdentical

func AreSliceElementsIdentical(slice1, slice2 []string) bool

AreSliceElementsIdentical checks if the elements of two string slices are identical.

func IntersectUnique

func IntersectUnique(slice1, slice2 []string) []string

IntersectUnique returns the unique common elements between two string slices.

Types

type Distributor

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

func NewDistributor

func NewDistributor(ctx context.Context, database database.Client, cache cache.Client, httpClient httputil.Client, stakingContract *l2.StakingV2MulticallClient, networkParamsContract *l2.NetworkParams, txManager *txmgr.SimpleTxManager, settlerConfig *config.Settler, chainID *big.Int) (*Distributor, error)

NewDistributor creates a new distributor.

func (*Distributor) DistributeData added in v0.8.0

func (d *Distributor) DistributeData(ctx context.Context, requestType, component string, request interface{}, params url.Values, workers, networks []string) ([]byte, error)

DistributeData distributes requests to qualified Nodes.

func (*Distributor) DistributeRSSHubData

func (d *Distributor) DistributeRSSHubData(ctx context.Context, path, query string) ([]byte, error)

DistributeRSSHubData distributes RSSHub requests to qualified Nodes.

type NetworkWorkersMap

type NetworkWorkersMap struct {
	Workers map[string][]string
}

type WorkerNetworksMap

type WorkerNetworksMap struct {
	Networks map[string][]string
}

Jump to

Keyboard shortcuts

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