Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactoryManager ¶
func NewFactoryManager() *factoryManager
func RegisterFactory ¶
func SetDriver ¶
func SetDriver(name string, driver ILogDriver)
Types ¶
type DriverManager ¶
type DriverManager struct {
// contains filtered or unexported fields
}
func NewDriverManager ¶
func NewDriverManager() *DriverManager
func (*DriverManager) Get ¶
func (m *DriverManager) Get(name string) (ILogDriver, bool)
func (*DriverManager) Set ¶
func (m *DriverManager) Set(name string, driver ILogDriver)
type IFactory ¶
type IFactory interface {
Create(config string) (ILogDriver, map[string]interface{}, error)
}
func GetFactory ¶
type ILogDriver ¶
type ILogDriver interface {
LogInfo(clusterId string, id string) (*LogInfo, error)
LogCount(clusterId string, conditions map[string]string, spendHour int64, group string) (map[string]int64, error)
Logs(clusterId string, conditions map[string]string, start time.Time, end time.Time, limit int64, offset int64) ([]*LogItem, int64, error)
LogRecords(clusterId string, start time.Time, end time.Time) ([]*LogItem, error)
}
func GetDriver ¶
func GetDriver(name string) (ILogDriver, bool)
type LogItem ¶
type LogItem struct {
ID string
Strategy string
Service string
API string
Method string
Url string
RemoteIP string
Consumer string
Authorization string
InputToken int64
OutputToken int64
TotalToken int64
AIProvider string
AIModel string
StatusCode int64
ResponseTime int64
Traffic int64
RecordTime time.Time
}
Click to show internal directories.
Click to hide internal directories.