Documentation ¶
Index ¶
- Constants
- Variables
- func GetSingleton[T any]()
- func InstrumentHandler(label string, handler http.Handler) http.Handler
- func InstrumentHandlerFunc(label string, f func(w http.ResponseWriter, r *http.Request)) http.Handler
- func Run[T any, P PointerToRoot[T]](ctx context.Context, app func(context.Context, *T) error) error
- type AutoMarshal
- type Components
- type DoneFunc
- type DoneInfo
- type Endpoint
- type Initializer
- type Injector
- type InstanceOf
- type Listener
- type NotRetriable
- type PointerToRoot
- type Ref
- type Resolver
- type Result
- type Root
- type Selector
- type Singleton
- type WithConfig
- type WithRouter
Constants ¶
View Source
const HealthURL = "/debug/akasar/health"
Variables ¶
View Source
var HealthHandler = func(w http.ResponseWriter, _ *http.Request) { _, _ = fmt.Fprintf(w, "OK") }
View Source
var RemoteCallError = errors.New("service akasar remote call error")
Functions ¶
func GetSingleton ¶
func GetSingleton[T any]()
func InstrumentHandlerFunc ¶
Types ¶
type AutoMarshal ¶
type AutoMarshal struct { }
func (*AutoMarshal) AkasarMarshal ¶
func (*AutoMarshal) AkasarMarshal(enc *codegen.Serializer)
func (*AutoMarshal) AkasarUnmarshal ¶
func (*AutoMarshal) AkasarUnmarshal(enc *codegen.Deserializer)
type Components ¶
type Components[T any] struct { // contains filtered or unexported fields }
type Initializer ¶
type InstanceOf ¶
type InstanceOf[T any] interface { // contains filtered or unexported methods }
InstanceOf 组件实例标识
type NotRetriable ¶
type NotRetriable interface { }
type PointerToRoot ¶
type PointerToRoot[T any] interface { *T InstanceOf[Root] }
type WithConfig ¶
type WithConfig[T any] struct { // contains filtered or unexported fields }
func (*WithConfig[T]) Config ¶
func (wc *WithConfig[T]) Config() *T
type WithRouter ¶
type WithRouter[T any] struct { }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.