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 PeerFetcherMode ¶
type PeerFetcherMode uint8
PeerFetcherMode indicates which PeerFetcher implementation to register with the universe
const ( FetchGRPC PeerFetcherMode = iota FetchHTTP )
Click to show internal directories.
Click to hide internal directories.