microdomain

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MicroDomain

type MicroDomain struct {
	// UnimplementedDomainServer is embedded to enable forwards compatability
	grpc.UnimplementedDomainServer

	// Identity holds Identifying information for the Domain
	ident.Identity
	// contains filtered or unexported fields
}

func NewMicroDomain

func NewMicroDomain(c config.DomainConfig, service Service) (*MicroDomain, error)

NewMicroDomain creates a new Domain, to correctly build the Domain, just initialize

func (*MicroDomain) Heartbeat

func (d *MicroDomain) Heartbeat(ctx context.Context, request *grpc.HeartbeatRequest) (*grpc.HeartbeatReply, error)

Heartbeat implements grpc and allows the domain to use grpc. Heartbeat serves as the heartbeat from a dominion.

func (MicroDomain) Run

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

func (*MicroDomain) StartService

func (d *MicroDomain) StartService(ctx context.Context, request *grpc.StartServiceRequest) (*grpc.StartServiceReply, error)

StartService implements grpc and initiates a service in the domain.

type Service

type Service interface {
	Run(ctx context.Context)
	GetService() ident.ServiceIdentity
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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