forked from TrueCloudLab/frostfs-contract
[#236] *: Notify user on success
Add notifications to: - container put, delete, setEACL - netmap addPeer, updateState Because notifications are limited in size (currently arguments should be less than 1024 bytes) provide only minimal information, such as entity ID (container ID or node public key). Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
0aa7fd4189
commit
fd70f28b47
4 changed files with 39 additions and 3 deletions
|
@ -14,6 +14,12 @@ events:
|
|||
type: PublicKey
|
||||
- name: token
|
||||
type: ByteArray
|
||||
- name: PutSuccess
|
||||
parameters:
|
||||
- name: containerID
|
||||
type: Hash256
|
||||
- name: publicKey
|
||||
type: PublicKey
|
||||
- name: containerDelete
|
||||
parameters:
|
||||
- name: containerID
|
||||
|
@ -22,6 +28,10 @@ events:
|
|||
type: Signature
|
||||
- name: token
|
||||
type: ByteArray
|
||||
- name: DeleteSuccess
|
||||
parameters:
|
||||
- name: containerID
|
||||
type: ByteArray
|
||||
- name: setEACL
|
||||
parameters:
|
||||
- name: eACL
|
||||
|
@ -32,6 +42,12 @@ events:
|
|||
type: PublicKey
|
||||
- name: token
|
||||
type: ByteArray
|
||||
- name: SetEACLSuccess
|
||||
parameters:
|
||||
- name: containerID
|
||||
type: ByteArray
|
||||
- name: publicKey
|
||||
type: PublicKey
|
||||
- name: StartEstimation
|
||||
parameters:
|
||||
- name: epoch
|
||||
|
|
|
@ -276,6 +276,7 @@ func PutNamed(container []byte, signature interop.Signature,
|
|||
}
|
||||
|
||||
runtime.Log("added new container")
|
||||
runtime.Notify("PutSuccess", containerID, publicKey)
|
||||
}
|
||||
|
||||
// checkNiceNameAvailable checks if nice name is available for the container.
|
||||
|
@ -357,6 +358,7 @@ func Delete(containerID []byte, signature interop.Signature, token []byte) {
|
|||
}
|
||||
removeContainer(ctx, containerID, ownerID)
|
||||
runtime.Log("remove container")
|
||||
runtime.Notify("DeleteSuccess", containerID)
|
||||
}
|
||||
|
||||
// Get method returns structure that contains stable marshaled Container structure,
|
||||
|
@ -464,6 +466,7 @@ func SetEACL(eACL []byte, signature interop.Signature, publicKey interop.PublicK
|
|||
common.SetSerialized(ctx, key, rule)
|
||||
|
||||
runtime.Log("success")
|
||||
runtime.Notify("SetEACLSuccess", containerID, publicKey)
|
||||
}
|
||||
|
||||
// EACL method returns structure that contains stable marshaled EACLTable structure,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue