peercfg

package module
v0.0.0-...-df1970c Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package peercfg defines the Config struct that is shared between both the test driver and the test peers (which may be running different versions). This type will be passed as a JSON blob to stdin for the peer subprocesses to configure Galaxycache (some portions may be optional depending on the Galaxycache version).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SelfName string
	Peers    []Peer
	IncSelf  bool

	// Preregister these keys to the peer in the value
	PreRegisterKeys map[string]string

	FetchProto PeerFetcherMode
	ListenMode ListenMode

	Galaxies []Galaxy
}

Config provides the key attributes of the peer

type Galaxy

type Galaxy struct {
	Name           string
	EchoKey        bool
	PrefixSelfName bool
	Bytes          uint64
	HydrationMode  GalaxyHandlerMode
	Expiry         time.Time

	Peek *PeekConfig
}

Galaxy provides information about initializing this galaxy

type GalaxyHandlerMode

type GalaxyHandlerMode uint8
const (
	HandlerSuccess GalaxyHandlerMode = iota
	HandlerFail
	HandlerNotFound     // shouldn't be set for peers that are too old to support it
	HandlerGRPCNotFound // can always be set
)

type ListenMode

type ListenMode uint8

ListenMode indicates which servers to setup

const (
	// use FD3 for the listener on the gRPC server
	ListenGRPC ListenMode = iota
	// use FD3 for the listener on the HTTP server
	ListenHTTP
	// use FD3 for the listener on the gRPC server and FD 4 for the
	// listener on the HTTP server
	ListenGRPCHTTP
)

type PeekConfig

type PeekConfig struct {
	Timeout  time.Duration
	WarmTime time.Duration
}

type Peer

type Peer struct {
	Name    string
	Address string
}

Peer provides the relevant information about this peer

type PeerFetcherMode

type PeerFetcherMode uint8

PeerFetcherMode indicates which PeerFetcher implementation to register with the universe

const (
	FetchGRPC PeerFetcherMode = iota
	FetchHTTP
)

Jump to

Keyboard shortcuts

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