Orga + Consent
This commit is contained in:
+13
-2
@@ -208,6 +208,14 @@ const (
|
||||
// for a private source resource (isReachable=false, Phase 4).
|
||||
// oc-discovery routes it to the resource owner peer via ProtocolSourcePresignResource.
|
||||
PB_SOURCE_PRESIGN
|
||||
|
||||
// PB_ORG_PARTNER is propagated via PB_PROPAGATE through oc-discovery to the
|
||||
// organization master's oc-discovery, which notifies its oc-peer via
|
||||
// ORG_PARTNER_EVENT. The master's oc-peer confirms or rejects by emitting a
|
||||
// PROPALGATION_EVENT back, which oc-discovery routes to the originating
|
||||
// oc-discovery, which in turn notifies our oc-peer via ORG_PARTNER_EVENT to
|
||||
// finalize the relation.
|
||||
PB_ORG_PARTNER
|
||||
)
|
||||
|
||||
func GetActionString(ss string) PubSubAction {
|
||||
@@ -242,6 +250,8 @@ func GetActionString(ss string) PubSubAction {
|
||||
return PB_PROPAGATE
|
||||
case "source_presign":
|
||||
return PB_SOURCE_PRESIGN
|
||||
case "org_partner":
|
||||
return PB_ORG_PARTNER
|
||||
default:
|
||||
return NONE
|
||||
}
|
||||
@@ -264,8 +274,9 @@ var path = []string{
|
||||
"none", // 12 NONE
|
||||
"observe", // 13 PB_OBSERVE
|
||||
"observe_close", // 14 PB_OBSERVE_CLOSE
|
||||
"propagate", // 15 PB_PROPAGATE
|
||||
"source_presign", // 16 PB_SOURCE_PRESIGN
|
||||
"propagate", // 15 PB_PROPAGATE
|
||||
"source_presign", // 16 PB_SOURCE_PRESIGN
|
||||
"org_partner", // 17 PB_ORG_PARTNER
|
||||
}
|
||||
|
||||
func (m PubSubAction) String() string {
|
||||
|
||||
@@ -32,7 +32,7 @@ var meths = []string{"remove execution", "create execution", "planner execution"
|
||||
"considers event", "admiralty config event", "minio config event", "pvc config event",
|
||||
"workflow started event", "workflow step done event", "workflow done event",
|
||||
"peer behavior event", "peer observe response event", "peer observe event",
|
||||
"source presign event",
|
||||
"source presign event", "org partner event",
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -85,6 +85,10 @@ const (
|
||||
// oc-datacenter listens to it to generate a pre-signed Minio URL and reply
|
||||
// via PB_CONSIDERS (Phase 4 — isReachable=false).
|
||||
SOURCE_PRESIGN_EVENT
|
||||
|
||||
// ORG_PARTNER_EVENT is emitted by a peer to its OrganizationMaster to ask:
|
||||
// "is peer X one of your members?". The master replies via the same channel.
|
||||
ORG_PARTNER_EVENT
|
||||
)
|
||||
|
||||
func (n NATSMethod) String() string {
|
||||
@@ -98,7 +102,7 @@ func NameToMethod(name string) NATSMethod {
|
||||
CONSIDERS_EVENT, ADMIRALTY_CONFIG_EVENT, MINIO_CONFIG_EVENT, PVC_CONFIG_EVENT,
|
||||
WORKFLOW_STARTED_EVENT, WORKFLOW_STEP_DONE_EVENT, WORKFLOW_DONE_EVENT,
|
||||
PEER_BEHAVIOR_EVENT, PEER_OBSERVE_RESPONSE_EVENT, PEER_OBSERVE_EVENT,
|
||||
SOURCE_PRESIGN_EVENT} {
|
||||
SOURCE_PRESIGN_EVENT, ORG_PARTNER_EVENT} {
|
||||
if strings.Contains(strings.ToLower(v.String()), strings.ToLower(name)) {
|
||||
return v
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user