Class BuildlessGrpc.BuildlessFutureStub

java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractFutureStub<BuildlessGrpc.BuildlessFutureStub>
com.buildless.service.v1.BuildlessGrpc.BuildlessFutureStub
Enclosing class:
BuildlessGrpc

public static final class BuildlessGrpc.BuildlessFutureStub extends io.grpc.stub.AbstractFutureStub<BuildlessGrpc.BuildlessFutureStub>
A stub to allow clients to do ListenableFuture-style rpc calls to service Buildless.
 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.
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub

    io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>>
  • Method Summary

    Modifier and Type
    Method
    Description
    build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
     
    com.google.common.util.concurrent.ListenableFuture<HttpBody>
    ## Cache Fetch Fetch an item from the Buildless cache which resides at a known key.
    com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>
    ## Cache Flush by Key Flush data from the cache at a given cache key.
    com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>
    ## Cache Probe Probe the cache for a specific key.
    com.google.common.util.concurrent.ListenableFuture<CacheStoreResponse>
    ## Cache Store Persist a bundle of raw data with the Buildless cache, which should reside at a known key.

    Methods inherited from class io.grpc.stub.AbstractFutureStub

    newStub, newStub

    Methods inherited from class io.grpc.stub.AbstractStub

    getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOption, withWaitForReady

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • build

      protected BuildlessGrpc.BuildlessFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<BuildlessGrpc.BuildlessFutureStub>
    • cacheProbe

      public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> cacheProbe(CacheFetchRequest request)
       ## 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

      public com.google.common.util.concurrent.ListenableFuture<HttpBody> cacheFetch(CacheFetchRequest request)
       ## 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

      public com.google.common.util.concurrent.ListenableFuture<CacheStoreResponse> cacheStore(CacheStoreRequest request)
       ## 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

      public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> cacheFlush(CacheFlushRequest request)
       ## 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.