directoryserver

package
v0.0.0-...-102eb4e Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name                string
	HTTPPort            int
	GRPCPort            int
	CaAddress           string
	SQLConnectionString string
	Hostname            string
	CertificatePath     string
	IfritTCPPort        int
	IfritUDPPort        int
}

type DirectoryServerCore

type DirectoryServerCore struct {
	pb.UnimplementedDirectoryServerServer
	// contains filtered or unexported fields
}

func NewDirectoryServerCore

func NewDirectoryServerCore(cm certManager, dsLookupService datasetLookupService, memManager membershipManager, checkoutManager datasetCheckoutManager, config *Config) (*DirectoryServerCore, error)

Returns a new DirectoryServer using the given configuration. Returns a non-nil error, if any.

func (*DirectoryServerCore) Handshake

func (d *DirectoryServerCore) Handshake(ctx context.Context, node *pb.Node) (*pb.HandshakeResponse, error)

Adds the given node to the network and returns the DirectoryServerCore's IP address

func (*DirectoryServerCore) Start

func (d *DirectoryServerCore) Start()

Starts the directory server. This includes starting the HTTP server, Ifrit client and gRPC server. In addition, it will try and restore the state it had before it crashed.

func (*DirectoryServerCore) Stop

func (d *DirectoryServerCore) Stop()

Create a node that performs a handshake with

Jump to

Keyboard shortcuts

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