package
Version:
v0.3.0
Opens a new window with list of versions in this module.
Published: Mar 26, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func ComposeLayers[Req, Resp any, S Service[Req, Resp], L Layer[Req, Resp, S]](service S, layers ...L) S
type Layer[Req, Resp any, S Service[Req, Resp]] interface {
Next(service S) S
}
type LayerFn[Req, Resp any, S Service[Req, Resp]] func(service S) S
func (self LayerFn[Req, Resp, S]) Next(service S) S
Service is the interface that provides the business logic for the service.
ServiceFn is the function type that implements the Service interface.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.