Documentation
¶
Index ¶
Constants ¶
View Source
const ( FlowMessageType = "RT.DPC.STATION.DI" SwfdpTarget = "WMC_SWFDP" )
View Source
const (
Grib2ProductionType = "prod_grib2"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flow ¶
type Flow struct { MessageType string Message string DataFlow string Send string BusinessState string }
func CreateFlow ¶
func (*Flow) FillMessage ¶
func (f *Flow) FillMessage(m *MonitorMessage)
type ModelInfo ¶
func CreateGrapesGfsGmfModelInfo ¶
func CreateGrapesGfsGmfModelInfo() ModelInfo
func (*ModelInfo) FillMessage ¶
func (modelInfo *ModelInfo) FillMessage(m *MonitorMessage)
type MonitorMessage ¶
type MonitorMessage struct { MessageType string `json:"type"` // topic: RT.DPC.STATION.DI Name string `json:"name"` // 消息名称: GRAPES_GFS Message string `json:"message"` // 消息描述: GRAPES_GFS_GMF Message OccurTime int64 `json:"occur_time"` // 时间戳 Fields ProdFileFields `json:"fields"` }
func CreateProdFileMessage ¶
func CreateProdFileMessage( modelInfo ModelInfo, productionInfo ProductionInfo, flow Flow) MonitorMessage
type ProdFileFields ¶
type ProdFileFields struct { DataType string `json:"DATA_TYPE"` // 四级编码,GRAPES_GFS: DI.CODE.0001.0002 DataType1 string `json:"DATA_TYPE_1"` // 数据源:nwpc_grapes_gfs DataTime string `json:"DATA_TIME"` // 出产品数据的业务时次,分钟级别:2019-10-23 16:31:00 FileName string `json:"FILE_NAME"` // 文件名称 BusinessState string `json:"BUSINESS_STATE"` // 业务状态:1(正常)、0(错误) Receive string `json:"RECEIVE"` // 上游系统编码:GRAPES_GFS Send string `json:"SEND"` // 资料去向,存储系统标识:WMC_SWFDP DataFlow string `json:"DATA_FLOW"` // 业务流程标识:BDMAIN(大数据平台主流程) ProdType string `json:"type"` // 产品类型,GRIB2数据:prod_grib2 AbsoluteDataName string `json:"absoluteDataName"` // 文件绝对路径 StartTime string `json:"start_time"` // 起报时间,YYYYMMDDHH ForecastTime string `json:"forecast_time"` // 时效, FFF }
type ProductionInfo ¶
type ProductionInfo struct { ProdType string AbsoluteDataName string FileName string StartTime time.Time ForecastTime time.Duration DataTime time.Time }
func (*ProductionInfo) FillMessage ¶
func (info *ProductionInfo) FillMessage(m *MonitorMessage)
Click to show internal directories.
Click to hide internal directories.