Add worker tagging (#862)
This allows workers to have tags assigned to them, which can then be filtered to control which targets they are allowed to serve.
This commit is contained in:
1 parent
595a86508e
commit
717a3b52ee
54 files changed
+2150
-666
No files matched your search
@@ -21,6 +21,7 @@ type Target interface {
|
||||
GetUpdateTime() *timestamp.Timestamp
|
||||
GetSessionMaxSeconds() uint32
|
||||
GetSessionConnectionLimit() int32
|
||||
GetWorkerFilter() string
|
||||
oplog(op oplog.OpType) oplog.Metadata
|
||||
}
|
||||
|
||||
@@ -92,6 +93,7 @@ func (t *targetView) targetSubType() (Target, error) {
|
||||
tcpTarget.Version = t.Version
|
||||
tcpTarget.SessionMaxSeconds = t.SessionMaxSeconds
|
||||
tcpTarget.SessionConnectionLimit = t.SessionConnectionLimit
|
||||
tcpTarget.WorkerFilter = t.WorkerFilter
|
||||
return &tcpTarget, nil
|
||||
}
|
||||
return nil, fmt.Errorf("%s is an unknown target subtype of %s", t.PublicId, t.Type)
|
||||
|
||||
Reference in new issue
Block a user