container struct is for sharing data which such as database setting, the setting of application and logger in overall this application.
| 45 | |
| 46 | // container struct is for sharing data which such as database setting, the setting of application and logger in overall this application. |
| 47 | type container struct { |
| 48 | env *config.Env |
| 49 | config *config.AppConfig |
| 50 | cache *otter.Cache[string, any] |
| 51 | sseServer *sse.Server |
| 52 | eventProcessor *event.EventProcessor |
| 53 | socketUpgrader *websocket.Upgrader |
| 54 | portForwarder *portforward.PortForwarder |
| 55 | mu sync.RWMutex |
| 56 | } |
| 57 | |
| 58 | // NewContainer is constructor. |
| 59 | func NewContainer(env *config.Env, cfg *config.AppConfig) Container { |
nothing calls this directly
no outgoing calls
no test coverage detected