Initial commit

This commit is contained in:
2024-12-31 01:27:53 -05:00
commit b3913d8078
25 changed files with 2477 additions and 0 deletions

20
config.go Normal file
View 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)
}