Send structs on the queue

#4 · open · 1 comments

View on GitHub ↗

Harwayne

https://github.com/sbezverk/syslog2cloud/blob/ecd07a0acbecc7bef2fb940b214af9a94655bc27/pkg/syslog/server.go#L67 The queue sends `[]byte`, can we make it a struct instead? That will make it easier to elevate some of the fields into Cloud Event attributes, if desired in the futures.

Comments

grantr

The `[]byte` is sent to `captainslog.NewSyslogMsgFromBytes(m)` at https://github.com/sbezverk/syslog2cloud/blob/c039815f08e900d16a1b4633ed8d84616d95fe71/pkg/manager/manager.go#L59 so it does eventually get a struct form. Perhaps this parsing could be moved to `transferSyslogMsg`, and the queue converted to `chan SyslogMsg`. https://godoc.org/github.com/digitalocean/captainslog#SyslogMsg