Types for an common Application status representation.
Add following into paket.references
Alma.ApplicationStatus
First of all you need to implement your CurrentApplication class/type.
type CurrentApplication = {
Instance: Instance
Environment: Environment
Dependencies: Dependencies
ServiceStatus: ServiceStatus
LoggerFactory: ILoggerFactory
DockerImageVersion: DockerImageVersion
}
and Dependencies = {
ConsentsRouter: ConsentsRouter
}This type can either implement ApplicationStatusFeature interfaces right away or just in the createStatus function
let createStatus (currentApplication: CurrentApplication) =
ApplicationStatus.create {
new ApplicationStatusFeature.ICurrentApplication with
member __.Instance = currentApplication.Instance
member __.Environment = currentApplication.Environment
interface ApplicationStatusFeature.IAssemblyInformation with
member __.GitBranch = GitBranch AssemblyVersionInformation.AssemblyMetadata_gitbranch
member __.GitCommit = GitCommit AssemblyVersionInformation.AssemblyMetadata_gitcommit
member __.GitRepository = GitRepository.empty
interface ApplicationStatusFeature.IDockerApplication with
member __.DockerImageVersion = currentApplication.DockerImageVersion
}NOTE: You can implement as many interfaces as you can. You can skip the rest if you don't provide the functionality.
- Increment version in
ApplicationStatus.fsproj - Update
CHANGELOG.md - Commit new version and tag it
./build.sh build./build.sh -t tests