Documentation
¶
Index ¶
Constants ¶
View Source
const MaxMessageSize = 150 * 1024 // 150 KB
Variables ¶
View Source
var ( ErrUnknown = errors.New("unknown argument passed") ErrInvalidArgument = errors.New("invalid argument passed") )
Functions ¶
func FilterEmptyStrings ¶
func GenerateID ¶
func ValidateMessageSize ¶
func ValidateMessageSize(msg *message_pb.Message) error
Types ¶
type ChronoError ¶
type ChronoError struct {
Level ErrorLevel
Code codes.Code // gRPC status code
Message string
Err error
}
func NewChronoError ¶
func NewChronoError(level ErrorLevel, code codes.Code, err error, msg string) *ChronoError
func (*ChronoError) Error ¶
func (ce *ChronoError) Error() string
func (*ChronoError) GRPCStatus ¶
func (e *ChronoError) GRPCStatus() error
Convert the ChronoError to a gRPC status error
type ErrorLevel ¶
type ErrorLevel int
const ( ERROR_LEVEL_INFO ErrorLevel = iota ERROR_LEVEL_ERROR ERROR_LEVEL_DEBUG )
Click to show internal directories.
Click to hide internal directories.