25 lines
539 B
Go
25 lines
539 B
Go
package runtime
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
|
|
"github.com/longpeng/configcenter/internal/domain"
|
|
)
|
|
|
|
var ErrRevisionCompacted = errors.New("runtime revision compacted")
|
|
|
|
type WatchResult struct {
|
|
Event domain.ConfigEvent
|
|
Err error
|
|
CompactRevision int64
|
|
}
|
|
|
|
type Store interface {
|
|
Close() error
|
|
Ping(context.Context) error
|
|
Put(context.Context, string, []byte, domain.Release) (int64, error)
|
|
Get(context.Context, string) (domain.RuntimeConfig, error)
|
|
Watch(context.Context, string, int64) <-chan WatchResult
|
|
}
|