// Message returns a message call with the given parameters.
// Callers are expected to fill in the FrameworkID.
422592
func Message(agentID, executorID string, data []byte) *scheduler.Call {
	return &scheduler.Call{
		Type: scheduler.Call_MESSAGE,
		Message: &scheduler.Call_Message{
			AgentID:    mesos.AgentID{Value: agentID},
			ExecutorID: mesos.ExecutorID{Value: executorID},
			Data:       data,
		},
	}
}
414230
func RequestMessage(level string, r *http.Request, msg string) {
	std.RequestMessage(level, r, msg)
}
21357
func (r *Room) Message(ctx context.Context, msg *UserMessage) {
	logger := pitaya.GetDefaultLoggerFromCtx(ctx)
	err := pitaya.GroupBroadcast(ctx, "connector", "room", "onMessage", msg)
	if err != nil {
		logger.Error("Error broadcasting message")
		logger.Error(err)
	}
}
97213
func (m *Message) Bytes() []byte {

	buffer := new(bytes.Buffer)

	// Message prefix
	if m.Prefix != nil {
		buffer.WriteByte(prefix)
		m.Prefix.writeTo(buffer)
		buffer.WriteByte(space)
	}

	// Command is required
	buffer.WriteString(m.Command)

	// Space separated list of arguments
	if len(m.Params) > 0 {
		buffer.WriteByte(space)
		buffer.WriteString(strings.Join(m.Params, string(space)))
	}

	if len(m.Trailing) > 0 || m.EmptyTrailing {
		buffer.WriteByte(space)
		buffer.WriteByte(prefix)
		buffer.WriteString(m.Trailing)
	}

	// We need the limit the buffer length.
	if buffer.Len() > (maxLength) {
		buffer.Truncate(maxLength)
	}

	return buffer.Bytes()
}
503669
func Marshal(m *lib.Message) (data []byte, err error) {
	payload := Wrap(m)
	data, err = proto.Marshal(&payload)
	if err != nil {
		err = fmt.Errorf("proto: %s", err)
		return
	}
	return
}
843196
func Info(msg string, args ...interface{}) Response {
	return Response{
		Status:  StatusPass,
		Message: fmt.Sprintf(msg, args...),
	}
}
221954
func Bytes(m *rfc5424.Message) []byte {
	msg := m.Bytes()
	return bytes.Join([][]byte{[]byte(strconv.Itoa(len(msg))), msg}, []byte{' '})
}
1271598
func (client Client) CaptureMessagef(format string, args ...interface{}) (string, error) {
	return client.CaptureMessage(fmt.Sprintf(format, args...))
}
1160404
func (w *Window) message(format string, args ...interface{}) {
	if *acmeDebug {
		q0, q1, _ := w.ReadAddr()
		log.Printf("message; addr=%d,%d", q0, q1)
	}
	if err := w.Addr(".-/\\n?\\n?/"); err != nil && *acmeDebug {
		log.Printf("set addr: %s", err)
	}
	q0, _, _ := w.ReadAddr()
	nl := ""
	if q0 > 0 {
		nl = "\n"
	}
	if *acmeDebug {
		q0, q1, _ := w.ReadAddr()
		log.Printf("inserting; addr=%d,%d", q0, q1)
	}
	w.Fprintf("data", nl+w.time()+format+"\n", args...)
	if *acmeDebug {
		q0, q1, _ := w.ReadAddr()
		log.Printf("wrote; addr=%d,%d", q0, q1)
	}
}
126739
func message(canvas *svg.SVG, x, y, w, h, l int, bcolor, scolor string) {
	et := h / 3
	w2 := w / 2
	px := w / 8
	py := h / 8
	e1x := []int{x, x, x + w, x + w, x + w2, x}
	e1y := []int{y + et, y + h, y + h, y + et, y + (et * 2), y + et}
	e2x := []int{x, x + w2, x + w, x + w2, x}
	e2y := []int{y + et, y, y + et, y + (et * 2), y + et}

	canvas.Polygon(e2x, e2y, "fill:"+bcolor)
	canvas.Polygon(e1x, e1y, "fill:"+scolor)
	canvas.Roundrect(x+px, y+py, w-(px*2), h-py, l, l, "fill:"+scolor)
	canvas.Line(x, y+et, x+w2, y+(et*2), "stroke-width:1;stroke:"+bcolor)
	canvas.Line(x+w, y+et, x+w2, y+(et*2), "stroke-width:1;stroke:"+bcolor)
}
306785
func (r *ValidationResult) Message(message string, args ...interface{}) *ValidationResult {
	if r.Error != nil {
		if len(args) == 0 {
			r.Error.Message = message
		} else {
			r.Error.Message = fmt.Sprintf(message, args...)
		}
	}
	return r
}
6740
func MessageType(name string) reflect.Type {
	if t, ok := protoTypedNils[name]; ok {
		return reflect.TypeOf(t)
	}
	return protoMapTypes[name]
}
743057
func (event *Event) MessageType() (msgtype string, ok bool) {
	value, exists := event.Content["msgtype"]
	if !exists {
		return
	}
	msgtype, ok = value.(string)
	return
}
154647
func (dl *ConsoleLogger) Info(message interface{}, params ...interface{}) {
	dl.logger.Infof(fmt.Sprintf("%s %s", caller(), fmt.Sprint(message)), params...)
}
908186
func (m *Message) String() string {
	return fmt.Sprintf("%v body=%s", m.Headers, m.Body)
}
3413
func (p ProtobufImpl) Marshal(msg proto.Message) ([]byte, error) {
	res, err := proto.Marshal(msg)
	return res, errors.WithStack(err)
}
269697
func messageFromBytes(data []byte) (*message, error) {

	var err error
	var versionData [4]byte
	var typeData [4]byte
	minimumDataSize := 4 + 4
	m := new(message)

	// check if the data is smaller than 36 which is the minimum
	if data == nil {
		return nil, MessageParsingError
	}

	if len(data) < minimumDataSize+1 {
		return nil, MessageParsingError
	}

	version := data[:4]
	typeMsg := data[4:8]
	message := data[8:]

	total := copy(versionData[:], version)
	if total != 4 {
		return nil, MessageParsingError
	}

	total = copy(typeData[:], typeMsg)
	if total != 4 {
		return nil, MessageParsingError
	}

	m.Version = smallendian.FromInt(versionData)
	m.Type = smallendian.FromInt(typeData)
	m.Text = string(message)
	return m, err
}