2021-11-26 12:19:20 +00:00
|
|
|
package subnetevents
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2023-03-07 13:38:26 +00:00
|
|
|
subnetid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/subnet/id"
|
2021-11-26 12:19:20 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// common interface of subnet notifications with subnet ID.
|
|
|
|
type eventWithID interface {
|
|
|
|
// ReadID reads identifier of the subnet.
|
|
|
|
ReadID(*subnetid.ID) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// an error which is returned on zero subnet operation attempt.
|
|
|
|
type zeroSubnetOp struct {
|
|
|
|
op string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x zeroSubnetOp) Error() string {
|
|
|
|
return fmt.Sprintf("zero subnet %s", x.op)
|
|
|
|
}
|