server: go.chromium.org/goma/server/cache/gcs Index | Files

package gcs

import "go.chromium.org/goma/server/cache/gcs"

Package gcs provides cache service by google cloud storage.

Index

Package Files

cache.go doc.go

type AdmissionController Uses

type AdmissionController interface {
    AdmitPut(context.Context, *pb.PutReq) error
}

AdmissionController checks incoming request.

type Cache Uses

type Cache struct {
    AdmissionController AdmissionController
    // contains filtered or unexported fields
}

Cache represents key-value cache using google cloud storage.

func New Uses

func New(bkt *storage.BucketHandle) *Cache

New creates new cache.

func (*Cache) Get Uses

func (c *Cache) Get(ctx context.Context, in *pb.GetReq) (*pb.GetResp, error)

func (*Cache) Put Uses

func (c *Cache) Put(ctx context.Context, in *pb.PutReq) (*pb.PutResp, error)

func (*Cache) Stats Uses

func (c *Cache) Stats() Stats

type Stats Uses

type Stats struct {
    Hits int64
    Gets int64
}

Stats represents stats of gcs.Cache. TODO: use opencensus stats, view.

Package gcs imports 14 packages (graph) and is imported by 3 packages. Updated 2019-11-19. Refresh now. Tools for package owners.