Documentation
¶
Index ¶
- Variables
- func NewStore(file string) (eosc.IStore, error)
- func Register()
- type Config
- type Factory
- type Item
- type Store
- func (s *Store) AddListen(h eosc.IStoreEventHandler) error
- func (s *Store) All() []eosc.StoreValue
- func (s *Store) Del(id string) error
- func (s *Store) Get(id string) (eosc.StoreValue, bool)
- func (s *Store) GetListener() eosc.IStoreListener
- func (s *Store) Initialization() error
- func (s *Store) ReadLock(ctx context.Context) (bool, error)
- func (s *Store) ReadOnly() bool
- func (s *Store) ReadUnLock() error
- func (s *Store) Set(v eosc.StoreValue) error
- func (s *Store) TryLock(ctx context.Context, expire int) (bool, error)
- func (s *Store) UnLock() error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorReadOnly = fmt.Errorf("yaml :%w", eosc.ErrorStoreReadOnly)
)
Functions ¶
Types ¶
type Config ¶
type Config struct {
Include []string `json:":include" yaml:":include"`
Router []Item `json:"router" yaml:"router"`
Service []Item `json:"service" yaml:"service"`
Upstream []Item `json:"upstream" yaml:"upstream"`
Discovery []Item `json:"discovery" yaml:"discovery"`
Auth []Item `json:"auth" yaml:"auth"`
}
Config yaml文件配置项
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) All ¶
func (s *Store) All() []eosc.StoreValue
func (*Store) GetListener ¶
func (s *Store) GetListener() eosc.IStoreListener
func (*Store) Initialization ¶
func (*Store) ReadUnLock ¶
Click to show internal directories.
Click to hide internal directories.