identity

package
v0.0.0-...-6db7017 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertItoPBI

func ConvertItoPBI(ident Identity) (*pb.Identity, error)

Types

type Identity

type Identity struct {
	// UUID is a unique identifier for a Domain
	UUID string
	// Version is the version of Code which the Domain is running
	Version semver.Version
	// Services is the list of services the Domain currently offers
	Services map[string]ServiceIdentity

	// LastContact is when the legion last heard from this Identity
	LastContact time.Time

	// IP is the port which the Domain will be responding on
	IP net.IP
	// Port is the port which the Domain will be responding on
	Port int
}

Identity contains the all shareable information about a domain

func ConvertPBItoI

func ConvertPBItoI(pbIdent *pb.Identity) (Identity, error)

func ConvertPBItoIMultiple

func ConvertPBItoIMultiple(pbIdents []*pb.Identity) ([]Identity, error)

type ServiceIdentity

type ServiceIdentity struct {
	Port        int
	LastContact time.Time
}

Jump to

Keyboard shortcuts

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