logmessage

package
v6.14.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogMessage_MessageType_name = map[int32]string{
	1: "OUT",
	2: "ERR",
}
View Source
var LogMessage_MessageType_value = map[string]int32{
	"OUT": 1,
	"ERR": 2,
}

Functions

func DumpMessage

func DumpMessage(msg Message, buffer *bytes.Buffer)

Types

type LogEnvelope

type LogEnvelope struct {
	RoutingKey       *string     `protobuf:"bytes,1,req,name=routing_key" json:"routing_key,omitempty"`
	Signature        []byte      `protobuf:"bytes,2,req,name=signature" json:"signature,omitempty"`
	LogMessage       *LogMessage `protobuf:"bytes,3,req,name=log_message" json:"log_message,omitempty"`
	XXX_unrecognized []byte      `json:"-"`
}

func (*LogEnvelope) GetLogMessage

func (m *LogEnvelope) GetLogMessage() *LogMessage

func (*LogEnvelope) GetRoutingKey

func (m *LogEnvelope) GetRoutingKey() string

func (*LogEnvelope) GetSignature

func (m *LogEnvelope) GetSignature() []byte

func (*LogEnvelope) ProtoMessage

func (*LogEnvelope) ProtoMessage()

func (*LogEnvelope) Reset

func (m *LogEnvelope) Reset()

func (*LogEnvelope) SignEnvelope

func (e *LogEnvelope) SignEnvelope(sharedSecret string) error

func (*LogEnvelope) String

func (m *LogEnvelope) String() string

func (*LogEnvelope) VerifySignature

func (e *LogEnvelope) VerifySignature(sharedSecret string) bool

type LogMessage

type LogMessage struct {
	Message          []byte                  `protobuf:"bytes,1,req,name=message" json:"message,omitempty"`
	MessageType      *LogMessage_MessageType `protobuf:"varint,2,req,name=message_type,enum=logmessage.LogMessage_MessageType" json:"message_type,omitempty"`
	Timestamp        *int64                  `protobuf:"zigzag64,3,req,name=timestamp" json:"timestamp,omitempty"`
	AppId            *string                 `protobuf:"bytes,4,req,name=app_id" json:"app_id,omitempty"`
	SourceId         *string                 `protobuf:"bytes,6,opt,name=source_id" json:"source_id,omitempty"`
	DrainUrls        []string                `protobuf:"bytes,7,rep,name=drain_urls" json:"drain_urls,omitempty"`
	SourceName       *string                 `protobuf:"bytes,8,opt,name=source_name" json:"source_name,omitempty"`
	XXX_unrecognized []byte                  `json:"-"`
}

func ParseDumpedLogMessages

func ParseDumpedLogMessages(b []byte) (messages []*LogMessage, err error)

func (*LogMessage) GetAppId

func (m *LogMessage) GetAppId() string

func (*LogMessage) GetDrainUrls

func (m *LogMessage) GetDrainUrls() []string

func (*LogMessage) GetMessage

func (m *LogMessage) GetMessage() []byte

func (*LogMessage) GetMessageType

func (m *LogMessage) GetMessageType() LogMessage_MessageType

func (*LogMessage) GetSourceId

func (m *LogMessage) GetSourceId() string

func (*LogMessage) GetSourceName

func (m *LogMessage) GetSourceName() string

func (*LogMessage) GetTimestamp

func (m *LogMessage) GetTimestamp() int64

func (*LogMessage) ProtoMessage

func (*LogMessage) ProtoMessage()

func (*LogMessage) Reset

func (m *LogMessage) Reset()

func (*LogMessage) String

func (m *LogMessage) String() string

type LogMessage_MessageType

type LogMessage_MessageType int32
const (
	LogMessage_OUT LogMessage_MessageType = 1
	LogMessage_ERR LogMessage_MessageType = 2
)

func (LogMessage_MessageType) Enum

func (LogMessage_MessageType) MarshalJSON

func (x LogMessage_MessageType) MarshalJSON() ([]byte, error)

func (LogMessage_MessageType) String

func (x LogMessage_MessageType) String() string

func (*LogMessage_MessageType) UnmarshalJSON

func (x *LogMessage_MessageType) UnmarshalJSON(data []byte) error

type Message

type Message struct {
	// contains filtered or unexported fields
}

func GenerateMessage

func GenerateMessage(messageType LogMessage_MessageType, messageString, appId, sourceName string) (*Message, error)

func NewMessage

func NewMessage(logMessage *LogMessage, data []byte) *Message

func ParseEnvelope

func ParseEnvelope(data []byte, secret string) (message *Message, err error)

func ParseMessage

func ParseMessage(data []byte) (*Message, error)

func (*Message) GetLogMessage

func (m *Message) GetLogMessage() *LogMessage

func (*Message) GetRawMessage

func (m *Message) GetRawMessage() []byte

func (*Message) GetRawMessageLength

func (m *Message) GetRawMessageLength() uint32

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL