placement

package
v1.0.1-0...-f351835 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service updates the Dapr runtimes with distributed hash tables for stateful entities.

func NewPlacementService

func NewPlacementService(raftNode *raft.Server) *Service

NewPlacementService returns a new placement service.

func (*Service) MonitorLeadership

func (p *Service) MonitorLeadership()

MonitorLeadership is used to monitor if we acquire or lose our role as the leader in the Raft cluster. There is some work the leader is expected to do, so we must react to changes

reference: https://github.com/hashicorp/consul/blob/master/agent/consul/leader.go

func (*Service) ReportDaprStatus

func (p *Service) ReportDaprStatus(stream placementv1pb.Placement_ReportDaprStatusServer) error

ReportDaprStatus gets a heartbeat report from different Dapr hosts.

func (*Service) Run

func (p *Service) Run(port string, certChain *dapr_credentials.CertChain)

Run starts the placement service gRPC server.

func (*Service) Shutdown

func (p *Service) Shutdown()

Shutdown close all server connections.

Directories

Path Synopsis
Package placement is an implementation of Consistent Hashing and Consistent Hashing With Bounded Loads.
Package placement is an implementation of Consistent Hashing and Consistent Hashing With Bounded Loads.

Jump to

Keyboard shortcuts

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