forked from TrueCloudLab/frostfs-node
Add Inner Ring code
This commit is contained in:
parent
dadfd90dcd
commit
b7b5079934
400 changed files with 11420 additions and 8690 deletions
31
pkg/morph/event/event.go
Normal file
31
pkg/morph/event/event.go
Normal file
|
@ -0,0 +1,31 @@
|
|||
package event
|
||||
|
||||
// Type is a notification event enumeration type.
|
||||
type Type string
|
||||
|
||||
// Event is an interface that is
|
||||
// provided by Neo:Morph event structures.
|
||||
type Event interface {
|
||||
MorphEvent()
|
||||
}
|
||||
|
||||
// Equal compares two Type values and
|
||||
// returns true if they are equal.
|
||||
func (t Type) Equal(t2 Type) bool {
|
||||
return string(t) == string(t2)
|
||||
}
|
||||
|
||||
// String returns casted to string Type.
|
||||
func (t Type) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// TypeFromBytes converts bytes slice to Type.
|
||||
func TypeFromBytes(data []byte) Type {
|
||||
return Type(data)
|
||||
}
|
||||
|
||||
// TypeFromString converts string to Type.
|
||||
func TypeFromString(str string) Type {
|
||||
return Type(str)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue