Created
March 30, 2021 11:58
-
-
Save rishabh-gupta2/3e5d6918a499ee7f63b56d8127bba82d to your computer and use it in GitHub Desktop.
Encoder interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Encoder holds the details on JobHandler which are registered with Outboxer. | |
// and is responsible for serialization and deserialization of JobHandler. | |
type Encoder interface { | |
// Encode serialize any registered interface to a string. | |
Encode(handler interface{}) (string, error) | |
// Decode deserialize a valid encoded string to its interface. | |
Decode(content string) (interface{}, error) | |
// Register registers interfaces which will be serialized. | |
Register(handlerName string, handler interface{}) error | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment