Documentation ¶
Index ¶
Constants ¶
View Source
const ( SubjectAction = "kiam.console.action" SubjectNotice = "kiam.console.notice" SubjectAudit = "kiam.console.audit" SubjectLog = "kiam.console.log" )
View Source
const ( ReplyOk = 0 // ok ReplyError = 1 // general error ReplyNoReply = 100 // no reply(inbox) subject present ReplyBadVersion = 101 // version incompatibled ReplyBadTime = 102 // time incorrent ReplyNoReqid = 103 // missing reqid ReplyNoAction = 104 // missing action ReplyNotImp = 105 // not implemented )
reply code
View Source
const Version = "0.1.1"
semantic versioning, https://semver.org
Variables ¶
View Source
var Logger = logrus.StandardLogger().WithField("realm", "ms")
The default Logger has no any configuration(like log to file...), app should replace it with SetLogger()
Functions ¶
func MaxPayloadSize ¶ added in v0.0.3
func MaxPayloadSize() int64
MaxPayloadSize return maximum allowed payload size.
Types ¶
type Reply ¶ added in v0.0.3
type Reply struct { Version string `json:"version"` // protocol version Time int64 `json:"time"` // response timestamp, in microsecond ReqId string `json:"reqid"` // request id, unique Code int32 `json:"code"` // response code Message string `json:"message"` // response message Payload interface{} `json:"payload"` // payload }
reply data
Click to show internal directories.
Click to hide internal directories.