1 package sinks 2 3 // SyncOp represents synchronization operations for metrics. 4 // These constants are used both in Go code and protobuf definitions. 5 type SyncOp int32 6 7 const ( 8 // InvalidOp represents an invalid or unrecognized operation 9 InvalidOp SyncOp = iota // 0 10 // AddOp represents adding a new metric 11 AddOp // 1 12 // DeleteOp represents deleting an existing metric or entire source 13 DeleteOp // 2 14 // DefineOp represents defining metric definitions 15 DefineOp // 3 16 ) 17 18 // String returns the string representation of the SyncOp 19 func (s SyncOp) String() string { 20 switch s { 21 case InvalidOp: 22 return "InvalidOp" 23 case AddOp: 24 return "AddOp" 25 case DeleteOp: 26 return "DeleteOp" 27 case DefineOp: 28 return "DefineOp" 29 default: 30 return "Unknown" 31 } 32 } 33