// Deprecated: Use GetStoreMessage() instead
977366
func (mg *MailgunImpl) GetStoredMessageForURL(ctx context.Context, url string) (StoredMessage, error) {
	return mg.GetStoredMessage(ctx, url)
}
1300417
func getMessage(token []byte) interface{} {
	var data map[string]interface{}
	// unmarshal JSON encoded token into a map for
	err := json.Unmarshal(token, &data)
	if err != nil {
		return err
	}
	return decodeMessage(token, data)
}
312956
func (s *linkSession) gotMessage(msg *linkMessage, replychnl chan *linkMessage) {
  switch msg.Frame.Method() {
  case ALIVE_PING:
    // TODO: record ping?
    break
  case CLIENT_TUN_NEW:
    b, err := msg.Frame.GetParamStr(K_CIDR)
    if err == nil {
      _, cidr, err := net.ParseCIDR(string(b))
      if err == nil {
        if s.acceptTunnel(cidr) {
          // tunnel allowed
          t := &linkTunnel{
            tid: s.nextTunnelID(),
            allowed: cidr,
          }
          // add tunnel
          s.addTunnel(t)
          // reply
          replychnl <- &linkMessage{
            Addr: s.remote,
            Frame: newCreateClientTunnelReply(t.allowed, t.tid),
          }
        } else {
          // rejected
          replychnl <- &linkMessage{
            Addr: s.remote,
            Frame: newCreateClientTunnelReply(cidr, 0),
          }
        }
        return
      }
    }
    // error
    // TODO: reply?
    log.Println("error handling CLIENT_TUN_NEW", err)
    break
  case CLIENT_TUN_DEL:
     
  }
  
}
1059277
func (m *Manager) GetStore(storeName string) *CertificateStore {
	m.lock.RLock()
	defer m.lock.RUnlock()

	return m.getStore(storeName)
}
123310
func (api *Client) GetMessages(query ...*GetMessagesQuery) ([]*Message, error) {
	var options *GetMessagesQuery
	if len(query) > 0 {
		options = query[0]
	}
	result, _, err := api.makeRequest(http.MethodGet, api.concatUserPath(messagesPath), &[]*Message{}, options)
	if err != nil {
		return nil, err
	}
	return *(result.(*[]*Message)), nil
}
678680
func (c *Connection) getOutMessage() (x *buffer.OutMessage) {
	c.mu.Lock()
	x = (*buffer.OutMessage)(c.outMessages.Get())
	c.mu.Unlock()

	if x == nil {
		x = new(buffer.OutMessage)
	}
	x.Reset()

	return
}
264374
func (ms *MemoryMsgStore) GetSequenceFromTimestamp(timestamp int64) (uint64, error) {
	ms.RLock()
	defer ms.RUnlock()

	// No message ever stored
	if ms.first == 0 {
		return 0, nil
	}
	// All messages have expired
	if ms.first > ms.last {
		return ms.last + 1, nil
	}
	if timestamp <= ms.msgs[ms.first].Timestamp {
		return ms.first, nil
	}
	if timestamp == ms.msgs[ms.last].Timestamp {
		return ms.last, nil
	}
	if timestamp > ms.msgs[ms.last].Timestamp {
		return ms.last + 1, nil
	}

	index := sort.Search(len(ms.msgs), func(i int) bool {
		return ms.msgs[uint64(i)+ms.first].Timestamp >= timestamp
	})

	return uint64(index) + ms.first, nil
}
396876
func (ms *SQLMsgStore) GetSequenceFromTimestamp(timestamp int64) (uint64, error) {
	ms.Lock()
	defer ms.Unlock()
	// No message ever stored
	if ms.first == 0 {
		return 0, nil
	}
	// All messages have expired
	if ms.first > ms.last {
		return ms.last + 1, nil
	}
	r := ms.sqlStore.preparedStmts[sqlGetSequenceFromTimestamp].QueryRow(ms.channelID, timestamp)
	seq := uint64(0)
	err := r.Scan(&seq)
	if err == sql.ErrNoRows {
		return ms.last + 1, nil
	}
	if err != nil {
		return 0, sqlStmtError(sqlGetSequenceFromTimestamp, err)
	}
	return seq, nil
}
1003803
func (c *Config) GetStore() (cstorage.Store, error) {
	return cstorage.GetStore(cstorage.StoreOptions{
		RunRoot:            c.RunRoot,
		GraphRoot:          c.Root,
		GraphDriverName:    c.Storage,
		GraphDriverOptions: c.StorageOptions,
	})
}
1139016
func GetMessage(msg *Msg, hwnd uint32, MsgFilterMin uint32, MsgFilterMax uint32) (int32, error) {
	return int32(0), NewError(E_NOTIMPL)
}
1284547
func (c chatResponseFull) getMessageTimestamp() string {
	if len(c.Timestamp) > 0 {
		return c.Timestamp
	}
	return c.MessageTimeStamp
}
1179167
func DiscardMessage(msg *Message, pluginID string, comment string) {
	GetStreamMetric(msg.GetStreamID()).Discarded.Inc(1)
	MessageTrace(msg, pluginID, comment)
}
226994
func (store *MemoryStore) Get(key string) packets.ControlPacket {
	store.RLock()
	defer store.RUnlock()
	if !store.opened {
		ERROR.Println(STR, "Trying to use memory store, but not open")
		return nil
	}
	mid := mIDFromKey(key)
	m := store.messages[key]
	if m == nil {
		CRITICAL.Println(STR, "memorystore get: message", mid, "not found")
	} else {
		DEBUG.Println(STR, "memorystore get: message", mid, "found")
	}
	return m
}
238751
func GetRedisStore(s Store) (err error, rediStore *redistore.RediStore) {
	realStore, ok := s.(*store)
	if !ok {
		err = errors.New("unable to get the redis store: Store isn't *store")
	}

	rediStore = realStore.RediStore
	return
}
607668
func (m *Messages) Get(index int) (message *Message, _ error) {
	if index < 0 || index >= len(m.messages) {
		return nil, errors.New("index out of bounds")
	}
	return &Message{m.messages[index]}, nil
}
293170
func (msg *Message) GetMetadata() Metadata {
	if msg.data.metadata == nil {
		msg.data.metadata = make(Metadata)
	}
	return msg.data.metadata
}
1270448
func getTerminationMessage(status *runtimeapi.ContainerStatus, terminationMessagePath string, fallbackToLogs bool) (string, bool) {
	if len(terminationMessagePath) == 0 {
		return "", fallbackToLogs
	}
	for _, mount := range status.Mounts {
		if mount.ContainerPath != terminationMessagePath {
			continue
		}
		path := mount.HostPath
		data, _, err := tail.ReadAtMost(path, kubecontainer.MaxContainerTerminationMessageLength)
		if err != nil {
			if os.IsNotExist(err) {
				return "", fallbackToLogs
			}
			return fmt.Sprintf("Error on reading termination log %s: %v", path, err), false
		}
		return string(data), (fallbackToLogs && len(data) == 0)
	}
	return "", fallbackToLogs
}