Interface BuildlessGrpc.AsyncService

All Known Implementing Classes:
BuildlessGrpc.BuildlessImplBase
Enclosing class:
BuildlessGrpc

public static interface BuildlessGrpc.AsyncService
 Defines the API surface for the main Buildless service. Methods defined in this service are typically open to
 third-party developers. Under the hood of Buildless-powered tools, or via 3rd-party tools, these methods may be used
 to interact with the global cache, manage account state, and more.
 
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    cacheFetch(CacheFetchRequest request, io.grpc.stub.StreamObserver<HttpBody> responseObserver)
    ## Cache Fetch Fetch an item from the Buildless cache which resides at a known key.
    default void
    cacheFlush(CacheFlushRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
    ## Cache Flush by Key Flush data from the cache at a given cache key.
    default void
    cacheProbe(CacheFetchRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
    ## Cache Probe Probe the cache for a specific key.
    default void
    cacheStore(CacheStoreRequest request, io.grpc.stub.StreamObserver<CacheStoreResponse> responseObserver)
    ## Cache Store Persist a bundle of raw data with the Buildless cache, which should reside at a known key.
  • Method Details

    • cacheProbe

      default void cacheProbe(CacheFetchRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
       ## Cache Probe
       Probe the cache for a specific key. This method is used to determine whether a key is present in the cache without consuming the data associated with the key.
       This method is typically used by clients to determine whether a key is worth downloads from the cache, or whether it should be built locally.
       Often, tooling will skip this step and perform a `CacheFetch` directly, relying on HTTP 404 to indicate that the item could not be found. All cache probe requests must be authorized with an API key or user token.
       
    • cacheFetch

      default void cacheFetch(CacheFetchRequest request, io.grpc.stub.StreamObserver<HttpBody> responseObserver)
       ## Cache Fetch
       Fetch an item from the Buildless cache which resides at a known key. This endpoint should be used by tools which already know how to properly cache and resolve build inputs.
       Cache fetch requests are simple, and deal with only one input: a key, which should either be present in the hash or not. If the key is present, the cache will return the blob associated with it; in some circumstances, for large blobs, a redirect may be returned (where supported).
       If the key is not present, an HTTP 404 is issued to indicate a missing cache value. All cache fetch requests must be authorized either by a Buildless API key, or a user token.
       ### Avoiding HTTP caching
       If desired, `POST` may also be used for the `CacheFetch` operation, which avoids intermediate HTTP caching. By default, `GET` may be used if HTTP caching is desired or acceptable for your use case.
       
    • cacheStore

      default void cacheStore(CacheStoreRequest request, io.grpc.stub.StreamObserver<CacheStoreResponse> responseObserver)
       ## Cache Store
       Persist a bundle of raw data with the Buildless cache, which should reside at a known key. This endpoint should be used by tools which already know how to properly cache and resolve build inputs.
       Cache store requests specify the key at which the item should be stored. Cache keys may vary by tool or project, but, in all cases, are considered opaque by Buildless. All cache store requests must be authorized either by a Buildless API key, or a user token.
       HTTP `POST` and `PUT` are interchangeable for this endpoint.
       *Note:* The headers `Content-Type` and `Content-Length` are required to be set on all inputs. The `Content-Type` value is respected by the cache when the content is served. Different `Content-Length` values may change how the server responds to the upload request.
       
    • cacheFlush

      default void cacheFlush(CacheFlushRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
       ## Cache Flush by Key
       Flush data from the cache at a given cache key. If the data is not held by the cache, or is already expired, then this method is a no-op; otherwise, the data is removed from the cache.
       Cache flush requests may take some time to process. As a good rule of thumb, the cache should be considered in-sync within 30 seconds of issuing a `CacheFlush` request.
       All cache flush requests must be authorized either by a Buildless API key, or a user token.