Documentation ¶
Overview ¶
* Copyright (c) 2011-2018, Meituan Dianping. All Rights Reserved. * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright (c) 2011-2018, Meituan Dianping. All Rights Reserved. * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright (c) 2011-2018, Meituan Dianping. All Rights Reserved. * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright (c) 2011-2018, Meituan Dianping. All Rights Reserved. * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- Constants
- func Background()
- func BuildConfig(encoderType, enableHeartbeat, enableSampling, enableDebugLog int) C.CatClientConfig
- func Init(domain string)
- func InitWithConfig(domain string, _config C.CatClientConfig)
- func LogEvent(event *Event)
- func LogMetricForCount(name string, count int)
- func LogMetricForDuration(name string, durationInNano int64)
- func LogTransaction(trans *Transaction)
- func Send(m Messager)
- func Shutdown()
- func ShutdownAndWait()
- func Wait()
- type Event
- type Flush
- type Heartbeat
- type Message
- type MessageGetter
- type Messager
- type Transaction
Constants ¶
const ( SUCCESS = "0" FAIL = "-1" )
Variables ¶
This section is empty.
Functions ¶
func Background ¶
func Background()
func BuildConfig ¶
func BuildConfig( encoderType, enableHeartbeat, enableSampling, enableDebugLog int, ) C.CatClientConfig
func InitWithConfig ¶
func InitWithConfig(domain string, _config C.CatClientConfig)
func LogMetricForCount ¶
func LogMetricForDuration ¶
func LogTransaction ¶
func LogTransaction(trans *Transaction)
func ShutdownAndWait ¶
func ShutdownAndWait()
Types ¶
type Message ¶
type Message struct { Type string Name string Status string // contains filtered or unexported fields }
func NewMessage ¶
func (*Message) GetTimestamp ¶
func (*Message) SetTimestamp ¶
type Messager ¶
type Messager interface { MessageGetter AddData(k string, v ...string) SetStatus(status string) Complete() }
type Transaction ¶
type Transaction struct { Message // contains filtered or unexported fields }
func NewTransaction ¶
func NewTransaction(mtype, name string, flush Flush) *Transaction
func (*Transaction) Complete ¶
func (t *Transaction) Complete()
func (*Transaction) GetDuration ¶
func (t *Transaction) GetDuration() int64
func (*Transaction) SetDuration ¶
func (t *Transaction) SetDuration(durationInNano int64)
func (*Transaction) SetDurationStart ¶
func (t *Transaction) SetDurationStart(durationStartInNano int64)