Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kelseyhightower committed Oct 19, 2014
1 parent caa17ce commit 57bfad4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backend/backend.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
package backend

// Response represents a response from a backend store.
type Response struct {
Value []byte
Error error
}

// A Store is a K/V store backend that retrieves and sets, and monitors
// data in a K/V store.
type Store interface {
// Get retrieves a value from a K/V store for the provided key.
Get(key string) ([]byte, error)

// Set sets the provided key to value.
Set(key string, value []byte) error

// Watch monitors a K/V store for changes to key.
Watch(key string, stop chan bool) <-chan *Response
}

0 comments on commit 57bfad4

Please # to comment.