Documentation ¶
Index ¶
- Variables
- func CloseConn(conn *grpc.ClientConn)
- func FollowTransactionTemplate(ctx context.Context, process func() error, ...) error
- func GetConn() (*grpc.ClientConn, error)
- func InitSecondbaserClient(db *sql.DB, tracer *zipkin.Tracer, logLevel string, kafkaBrokerAddr string, ...)
- func SetLogFormat(ctx context.Context)
- func TransactionInitTemplate(ctx context.Context, t *zipkin.Tracer, businessType string, bizId string, ...) error
- type ActionType
- type BusinessTransactionContext
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LOGGER *logger.Logger AppName string TRACER *zipkin.Tracer DB *gorm.DB KafkaAddress string KafkaGroupId string Server string )
View Source
var SECONDBASER_PREFIX_TOPIC = "SECONDBASER_TRANSACTIONAL_"
Functions ¶
func CloseConn ¶
func CloseConn(conn *grpc.ClientConn)
func FollowTransactionTemplate ¶
func FollowTransactionTemplate(ctx context.Context, process func() error, rollback func(bizContext BusinessTransactionContext) error, forward func(bizContext BusinessTransactionContext) error) error
func GetConn ¶
func GetConn() (*grpc.ClientConn, error)
func InitSecondbaserClient ¶
func SetLogFormat ¶
Types ¶
type ActionType ¶
type ActionType string
var ( ACTION_TYPE_COMMIT ActionType = "COMMIT" ACTION_TYPE_ROLLBACK ActionType = "ROLLBACK" )
type BusinessTransactionContext ¶
type BusinessTransactionContext struct { Initiator string `json:"initiator"` TransactionId string `json:"transaction_id"` BusinessId string `json:"business_id"` BusinessType string `json:"business_type"` TransactionTime time.Time `json:"transaction_time"` FinishPhaseTime time.Time `json:"finish_phase_time"` ActionType ActionType `json:"action_type"` }
Click to show internal directories.
Click to hide internal directories.