github.com/songzhibin97/gkit@v1.2.13/distributed/broker/option.go (about) 1 package broker 2 3 import ( 4 "context" 5 6 "github.com/songzhibin97/gkit/options" 7 ) 8 9 func SetRetry(retry bool) options.Option { 10 return func(c interface{}) { 11 c.(*Broker).retry = retry 12 } 13 } 14 15 func SetRetryFn(fn func(ctx context.Context)) options.Option { 16 return func(c interface{}) { 17 c.(*Broker).retryFn = fn 18 } 19 }