Documentation ¶
Overview ¶
Package storage defines a runtime store and associated types for use with mserv.
Index ¶
- func GenerateStoreKey(org, api, hType, name string) string
- type DiffReport
- type MW
- type MservStore
- type Plugin
- type RuntimeStore
- func (s *RuntimeStore) AddMW(name string, mw *MW)
- func (s *RuntimeStore) FilterNewMW(fetched []*MW) (*DiffReport, error)
- func (s *RuntimeStore) GetHookFunc(name string) (func(*coprocess.Object) (*coprocess.Object, error), error)
- func (s *RuntimeStore) GetManifest(apiID string) (*apidef.BundleManifest, error)
- func (s *RuntimeStore) UpdateOrStoreHook(name string, hook func(*coprocess.Object) (*coprocess.Object, error)) (bool, error)
- func (s *RuntimeStore) UpdateOrStoreManifest(apiID string, manifest *apidef.BundleManifest) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateStoreKey ¶
Types ¶
type DiffReport ¶
type MservStore ¶
type MservStore interface { GetMWByID(ctx context.Context, id string) (*MW, error) GetMWByAPIID(ctx context.Context, APIID string) (*MW, error) GetAllActive(ctx context.Context) ([]*MW, error) CreateMW(ctx context.Context, mw *MW) (string, error) UpdateMW(ctx context.Context, mw *MW) (string, error) DeleteMW(ctx context.Context, id string) error InitMservStore(ctx context.Context, tag string) error }
type RuntimeStore ¶
type RuntimeStore struct {
// contains filtered or unexported fields
}
var GlobalRtStore *RuntimeStore
func NewRuntimeStore ¶
func NewRuntimeStore() *RuntimeStore
func (*RuntimeStore) AddMW ¶
func (s *RuntimeStore) AddMW(name string, mw *MW)
func (*RuntimeStore) FilterNewMW ¶
func (s *RuntimeStore) FilterNewMW(fetched []*MW) (*DiffReport, error)
func (*RuntimeStore) GetHookFunc ¶
func (*RuntimeStore) GetManifest ¶
func (s *RuntimeStore) GetManifest(apiID string) (*apidef.BundleManifest, error)
func (*RuntimeStore) UpdateOrStoreHook ¶
func (*RuntimeStore) UpdateOrStoreManifest ¶
func (s *RuntimeStore) UpdateOrStoreManifest(apiID string, manifest *apidef.BundleManifest) (bool, error)
Click to show internal directories.
Click to hide internal directories.