github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/cmn/cifl/flags.go (about) 1 // Package cifl: cluster information and flags 2 /* 3 * Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. 4 */ 5 package cifl 6 7 import "github.com/NVIDIA/aistore/cmn/cos" 8 9 type Flags cos.BitFlags 10 11 const ( 12 VoteInProgress = Flags(1 << iota) 13 ClusterStarted 14 NodeStarted 15 Rebalancing 16 RebalanceInterrupted 17 Resilvering 18 ResilverInterrupted 19 Restarted 20 OOS 21 OOM 22 ) 23 24 func (f Flags) IsSet(flag Flags) bool { return cos.BitFlags(f).IsSet(cos.BitFlags(flag)) } 25 func (f Flags) Set(flags Flags) Flags { return Flags(cos.BitFlags(f).Set(cos.BitFlags(flags))) } 26 func (f Flags) Clear(flags Flags) Flags { return Flags(cos.BitFlags(f).Clear(cos.BitFlags(flags))) }