Documentation
¶
Index ¶
- Constants
- func DefaultStore(store *store.FileStore) store.Store
- func Defaults() *ice.MagicBag
- func MakeFileStoreInEnvOrTemp(tmp *temp.TempDir) (*store.FileStore, error)
- func MakeHTTPServer(cfg *store.StoreConfig) *httpServer
- func Module() ice.Module
- func RunServer(bag *ice.MagicBag, schema jsonconfig.Schema, config []byte)
- type Server
Constants ¶
const ( // Store-related environment variables BundlestoreDirEnvVar = "BUNDLESTORE_STORE_DIR" // Maximum concurrent connections allowed to access underlying Store resources MaxConnections = 100 )
Variables ¶
This section is empty.
Functions ¶
func MakeFileStoreInEnvOrTemp ¶
Make a File Store based on the environment, or in temp if unset
func MakeHTTPServer ¶
func MakeHTTPServer(cfg *store.StoreConfig) *httpServer
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Represents a Bundlestore Server that serves HTTP and gRPC Bazel CAS APIs over an underlying Store with shared configuration and stats. StoreConfig is in part as a simplified solution to 2 problems golang-related problems we have with our current architecture: - values of Store and StatsReceiver interfaces don't pass down cleanly - encapsulating store, config and stats here prevented from being reused in cas because of cyclic dependency rules
func MakeServer ¶
func MakeServer(s store.Store, ttl *store.TTLConfig, stat stats.StatsReceiver, gc *bazel.GRPCConfig) *Server
Make a new server that delegates to an underlying store. TTL may be nil, in which case defaults are applied downstream. TTL duration may be overriden by request headers, but we always pass this TTLKey to the store.