ccache remote storage helpers are implemented as standalone programs. This module provides the common Go implementation of their IPC protocol and server.
- ccache remote storage helper IPC protocol handling
- Unix socket and Windows named-pipe listeners
- Request dispatch for GET, PUT, REMOVE, EXISTS, INFO and STOP requests
- Common
CRSH_*environment configuration parsing - Idle timeout handling and diagnostic reporting
- Optional file logging
The protocol is specified in the ccache remote storage helper specification.
logger := storagehelper.NewLogger(os.Getenv("CRSH_LOGFILE"))
defer logger.Close()
config, err := storagehelper.ParseConfig(logger)
// ...
identity := "ccache-storage-example 1.0"
storage, err := newStorageClient(...) // implementation of the storagehelper.Storage interface
// ...
server := storagehelper.NewServer(config, identity, storage, logger)
server.Run()make test
make format