Skip to content

donny-dont/drone-cache

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

drone-cache

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-plugins/drone-cache"

Import the package:

import "github.com/drone-plugins/drone-cache/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

Drone plugin for caching your build workspace

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%