Documentation
¶
Index ¶
- func NewBlobAccessFromConfiguration(configuration *pb.BlobAccessConfiguration, creator BlobAccessCreator) (blobstore.BlobAccess, error)
- func NewBlobReplicatorFromConfiguration(configuration *pb.BlobReplicatorConfiguration, source blobstore.BlobAccess, ...) (replication.BlobReplicator, error)
- func NewCASAndACBlobAccessFromConfiguration(configuration *pb.BlobstoreConfiguration, grpcClientFactory grpc.ClientFactory, ...) (blobstore.BlobAccess, blobstore.BlobAccess, error)
- func NewNestedBlobAccess(configuration *pb.BlobAccessConfiguration, creator BlobAccessCreator) (blobstore.BlobAccess, error)
- type BlobAccessCreator
- func NewACBlobAccessCreator(contentAddressableStorage blobstore.BlobAccess, ...) BlobAccessCreator
- func NewCASBlobAccessCreator(grpcClientFactory grpc.ClientFactory, maximumMessageSizeBytes int) BlobAccessCreator
- func NewICASBlobAccessCreator(grpcClientFactory grpc.ClientFactory, maximumMessageSizeBytes int) BlobAccessCreator
- type BlobReplicatorCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBlobAccessFromConfiguration ¶
func NewBlobAccessFromConfiguration(configuration *pb.BlobAccessConfiguration, creator BlobAccessCreator) (blobstore.BlobAccess, error)
NewBlobAccessFromConfiguration creates a BlobAccess object based on a configuration file.
func NewBlobReplicatorFromConfiguration ¶
func NewBlobReplicatorFromConfiguration(configuration *pb.BlobReplicatorConfiguration, source blobstore.BlobAccess, sink blobstore.BlobAccess, creator BlobReplicatorCreator) (replication.BlobReplicator, error)
NewBlobReplicatorFromConfiguration creates a BlobReplicator object based on a configuration file.
func NewCASAndACBlobAccessFromConfiguration ¶
func NewCASAndACBlobAccessFromConfiguration(configuration *pb.BlobstoreConfiguration, grpcClientFactory grpc.ClientFactory, maximumMessageSizeBytes int) (blobstore.BlobAccess, blobstore.BlobAccess, error)
NewCASAndACBlobAccessFromConfiguration is a convenience function to create BlobAccess objects for both the Content Addressable Storage and Action Cache. Most Buildbarn components tend to require access to both these data stores.
func NewNestedBlobAccess ¶
func NewNestedBlobAccess(configuration *pb.BlobAccessConfiguration, creator BlobAccessCreator) (blobstore.BlobAccess, error)
NewNestedBlobAccess may be called by BlobAccessCreator.NewCustomBlobAccess() to create BlobAccess objects for instances nested inside the configuration.
Types ¶
type BlobAccessCreator ¶
type BlobAccessCreator interface { BlobReplicatorCreator // GetStorageType() returns operations that can be used by // BlobAccess to create Buffer objects to return data. GetStorageType() blobstore.StorageType // GetStorageTypeName() returns a short string that identifies // the purpose of this storage (e.g., "ac", "cas"). GetStorageTypeName() string // NewCustomBlobAccess() can be used as a fallback to create // BlobAccess instances that only apply to this storage type. // For example, CompletenessCheckingBlobAccess is only // applicable to the Action Cache. NewCustomBlobAccess(configuration *pb.BlobAccessConfiguration) (blobstore.BlobAccess, string, error) // WrapTopLevelBlobAccess() is called at the very end of // NewBlobAccessFromConfiguration() to apply any top-level // decorators. WrapTopLevelBlobAccess(blobAccess blobstore.BlobAccess) blobstore.BlobAccess }
BlobAccessCreator contains a set of methods that are invoked by the generic NewBlobAccessFromConfiguration() function to create a BlobAccess of a specific kind (e.g., Action Cache, Content Addressable Storage).
func NewACBlobAccessCreator ¶
func NewACBlobAccessCreator(contentAddressableStorage blobstore.BlobAccess, grpcClientFactory grpc.ClientFactory, maximumMessageSizeBytes int) BlobAccessCreator
NewACBlobAccessCreator creates a BlobAccessCreator that can be provided to NewBlobAccessFromConfiguration() to construct a BlobAccess that is suitable for accessing the Action Cache.
func NewCASBlobAccessCreator ¶
func NewCASBlobAccessCreator(grpcClientFactory grpc.ClientFactory, maximumMessageSizeBytes int) BlobAccessCreator
NewCASBlobAccessCreator creates a BlobAccessCreator that can be provided to NewBlobAccessFromConfiguration() to construct a BlobAccess that is suitable for accessing the Content Addressable Storage.
func NewICASBlobAccessCreator ¶
func NewICASBlobAccessCreator(grpcClientFactory grpc.ClientFactory, maximumMessageSizeBytes int) BlobAccessCreator
NewICASBlobAccessCreator creates a BlobAccessCreator that can be provided to NewBlobAccessFromConfiguration() to construct a BlobAccess that is suitable for accessing the Indirect Content Addressable Storage.
type BlobReplicatorCreator ¶
type BlobReplicatorCreator interface { // GetDigestKeyFormat() returns the preferred way of creating // keys based on digests. For the Content Addressable Storage, // it is typically valid to discard the instance name, so that // we get a higher cache hit rate in case multiple instance // names are used. GetDigestKeyFormat() digest.KeyFormat // NewCustomBlobReplicator() can be used as a fallback to create // BlobReplicator instances that only apply to this storage // type. For example, sending replication requests over gRPC is // only supported for the Content Addressable Storage. NewCustomBlobReplicator(configuration *pb.BlobReplicatorConfiguration, source blobstore.BlobAccess, sink blobstore.BlobAccess) (replication.BlobReplicator, error) }
BlobReplicatorCreator contains a set of methods that are invoked by the generic NewBlobReplicatorFromConfiguration() function to create a BlobReplicator of a specific kind (e.g., Action Cache, Content Addressable Storage).
var ACBlobReplicatorCreator BlobReplicatorCreator = acBlobReplicatorCreator{}
ACBlobReplicatorCreator is a BlobReplicatorCreator that can be provided to NewBlobReplicatorFromConfiguration() to construct a BlobReplicator that is suitable for replicating Action Cache objects.
var ICASBlobReplicatorCreator BlobReplicatorCreator = icasBlobReplicatorCreator{}
ICASBlobReplicatorCreator is a BlobReplicatorCreator that can be provided to NewBlobReplicatorFromConfiguration() to construct a BlobReplicator that is suitable for replicating Indirect Content Addressable Storage objects.
func NewCASBlobReplicatorCreator ¶
func NewCASBlobReplicatorCreator(grpcClientFactory grpc.ClientFactory) BlobReplicatorCreator
NewCASBlobReplicatorCreator creates a BlobReplicatorCreator that can be provided to NewBlobReplicatorFromConfiguration() to construct a BlobReplicator that is suitable for replicating Content Addressable Storage objects.