dominion

package
v0.0.0-...-407825d Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dominion

type Dominion struct {
	// UnimplementedDominionServer is embedded to enable forwards compatability
	grpc.UnimplementedDominionServer

	// DominionIdentity holds the identifying information for the Dominion
	ident.Identity
	// contains filtered or unexported fields
}

Dominion is the leader of the Domains The Dominion is responsable for:

  • Listen for broadcasts from new/lonely Domains
  • Heartbeats to connected Domains
  • Command Domains to start new services

func NewDominion

func NewDominion(c config.DominionConfig) (*Dominion, error)

NewDominion creates a new dominion, to correctly build the dominion, just initialize

func (*Dominion) GetDomains

func (d *Dominion) GetDomains(ctx context.Context, request *grpc.Empty) (*grpc.GetDomainsReply, error)

GetDomains implements grpc and returns all domains and their services

func (*Dominion) GetServices

func (d *Dominion) GetServices(ctx context.Context, request *grpc.GetServicesRequest) (*grpc.GetServicesReply, error)

GetServices implements grpc and serves as the directory of services hosted on all domains. GetServices is called by services hosted on a single domain to find their dependencies.

func (Dominion) Run

func (d Dominion) Run(ctx context.Context) error

Run begins all the Dominion routines. Run doesn't return unless the Dominion has been ended

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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