Initial commit
This commit is contained in:
20
config.go
Normal file
20
config.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package camfish
|
||||
|
||||
import "iter"
|
||||
|
||||
// Config represents key/value data.
|
||||
type Config interface {
|
||||
Get(key string) string
|
||||
GetAll(key string) iter.Seq2[int, string]
|
||||
}
|
||||
|
||||
// MutableConfig is like Config, but can be changed. These methods should be
|
||||
// assumed unsafe for use by multiple concurrent goroutines. A MutableConfig
|
||||
// must not be retained nor shared. These methods must not be called while
|
||||
// iterating over All or GetAll.
|
||||
type MutableConfig interface {
|
||||
Config
|
||||
Add(key, value string)
|
||||
Del(key string)
|
||||
Set(key, value string)
|
||||
}
|
||||
Reference in New Issue
Block a user