Skip to content

gilala/drone-cache-lib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

drone-cache-lib

Build Status Coverage Status

drone-cache is a Go client library for creating cache plugins.

Download the package using go get:

go get "github.com/drone/drone-cache-lib"

Import the package:

import "github.com/drone/drone-cache-lib/cache"

The drone-cache library provides an interface for a Storage backend. When creating a new backend the following interface needs to be filled in.

type Storage interface {
	Get(p string, dst io.Writer) error
	Put(p string, src io.Reader) error
}

To create a Cache object using a Storage object:

cache, err := cache.New(storage)

To rebuild the cache:

err := cache.Rebuild(src, dst)

To restore the cache:

err := cache.Restore(src)

The drone-cache library currently supports the following file formats for cache storage

  • .tar

About

library for building cache plugins

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%