distributor

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 20 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(_ context.Context, database database.Client, cache cache.Client, httpClient httputil.Client, stakingContract *l2.Staking) *Distributor

NewDistributor creates a new distributor.

func (*Distributor) DistributeActivitiesData

func (d *Distributor) DistributeActivitiesData(ctx context.Context, request dsl.ActivitiesRequest) ([]byte, error)

DistributeActivitiesData distributes Activities requests to qualified Nodes.

func (*Distributor) DistributeActivityRequest

func (d *Distributor) DistributeActivityRequest(ctx context.Context, request dsl.ActivityRequest) ([]byte, error)

DistributeActivityRequest distributes Activity 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
}

type WorkerSet

type WorkerSet map[string]struct{}

Jump to

Keyboard shortcuts

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