Skip to content
Snippets Groups Projects
Commit fdbf5b8b authored by Pavel Antonov's avatar Pavel Antonov :asterisk:
Browse files

Merge branch 'feature/PRXS-1296-AddDBVersionToSDK' into 'master'

Добавлено поле DBVersion в collection.go и константа DBVersion в content.go

See merge request perxis/perxis-go!55
parents 7f4396c6 097a4fa9
No related branches found
No related tags found
No related merge requests found
Subproject commit 8606df02e0df6807e503bf22471a295020a47fba Subproject commit f000812a1eef24093c0d0abf1318e3179b679773
...@@ -90,6 +90,7 @@ type StateInfo struct { ...@@ -90,6 +90,7 @@ type StateInfo struct {
State State `json:"state" bson:"state"` State State `json:"state" bson:"state"`
Info string `json:"info" bson:"info"` Info string `json:"info" bson:"info"`
StartedAt time.Time `json:"started_at,omitempty" bson:"started_at,omitempty"` StartedAt time.Time `json:"started_at,omitempty" bson:"started_at,omitempty"`
DBVersion uint32 `json:"db_version" bson:"db_version"`
} }
type State int type State int
......
...@@ -38,6 +38,10 @@ type Content struct { ...@@ -38,6 +38,10 @@ type Content struct {
runners []Runnable runners []Runnable
} }
const (
DBVersion uint32 = 1
)
func (c *Content) RegisterStart(svc interface{}) { func (c *Content) RegisterStart(svc interface{}) {
if r, ok := svc.(Runnable); ok { if r, ok := svc.(Runnable); ok {
c.runners = append(c.runners, r) c.runners = append(c.runners, r)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment