package resthooks
import (
- sdl "gerrit.oran-osc.org/r/ric-plt/sdlgo"
cmap "github.com/orcaman/concurrent-map"
"net/http"
- "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/models"
+ "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/models"
)
type SubscriptionInfo struct {
type Resthook struct {
client *http.Client
subscriptions cmap.ConcurrentMap
- db *sdl.SdlInstance
+ db iSdl
Seq int64
}
+
+// TODO: remove this when RTMGR changes done
+type SubscriptionNotification struct {
+ Event string `json:"eventType,omitempty"`
+ ID string `json:"id,omitempty"`
+ Version int64 `json:"version,omitempty"`
+ XApps string `json:"xApps,omitempty"`
+}
+
+type iSdl interface {
+ Set(pairs ...interface{}) error
+ Get(keys []string) (map[string]interface{}, error)
+ GetAll() ([]string, error)
+ RemoveAll() error
+}