Skip to content
This repository was archived by the owner on Dec 23, 2025. It is now read-only.

feat: ✨ add ConfigurationManager#309

Open
erectfully wants to merge 1 commit intomainfrom
305-add-configuraton-management-abstraction
Open

feat: ✨ add ConfigurationManager#309
erectfully wants to merge 1 commit intomainfrom
305-add-configuraton-management-abstraction

Conversation

@erectfully
Copy link
Owner

No description provided.

@erectfully erectfully linked an issue Mar 8, 2024 that may be closed by this pull request
@height
Copy link

height bot commented Mar 8, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Comment on lines +28 to +32
export interface Configuration {
environment: "production" | "staging" | "testing" | "development" | "local"
http: HttpServerConfiguration
cacheMechanism: "redis" | "memcached" | "memory"
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export interface Configuration {
	environment: "production" | "staging" | "testing" | "development" | "local"
	http: HttpServerConfiguration
	cacheMechanism: CacheMechanismConfiguration
}

export interface RedisCacheConfiguration {
	host: string
	port: number
	password?: string
}

export interface MemcachedCacheConfiguration {
	servers: string[]
	options?: Memcached.Options
}

export interface InMemoryCacheConfiguration {
	maxSize?: number
	ttl?: number
}

type CacheMechanismConfiguration =
	| { type: "redis"; config: RedisCacheConfiguration }
	| { type: "memcached"; config: MemcachedCacheConfiguration }
	| { type: "memory"; config: InMemoryCacheConfiguration };

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔧 Add Configuraton Management Abstraction

1 participant