distributor

package
v0.5.27 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 19 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.Staking) (*Distributor, error)

NewDistributor creates a new distributor.

func (*Distributor) DistributeDecentralizedData added in v0.5.19

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

DistributeDecentralizedData distributes decentralized 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