Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/plugins/minos-discovery-kong/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# History

## 0.1.0a0 (2022-03-31)
## 0.1.0a1 (2022-03-31)

* First Alpha release
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = "Minos Framework Devs"
__email__ = "hey@minos.run"
__version__ = "0.7.0.dev2"
__version__ = "0.7.0.dev3"

from .client import (
KongClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ class KongClient(SetupMixin):
"""Kong Client class."""

def __init__(
self, protocol: str = "http", host: str = None, port: int = None, token_expiration_sec: int = None, **kwargs
self, protocol: str = None, host: str = None, port: int = None, token_expiration_sec: int = None, **kwargs
):
super().__init__(**kwargs)
if host is None:
host = "localhost"
if port is None:
port = 8001
if protocol is None:
protocol = "http"
if token_expiration_sec is None:
token_expiration_sec = 60 * 5

Expand All @@ -42,10 +44,11 @@ def _from_config(cls, config: Config, **kwargs) -> KongClient:
discovery_config = config.get_discovery()

token_expiration_sec = discovery_config.get("token-exp")
protocol = discovery_config.get("protocol")
host = discovery_config.get("host")
port = discovery_config.get("port")

return cls(host=host, port=port, token_expiration_sec=token_expiration_sec, **kwargs)
return cls(protocol=protocol, host=host, port=port, token_expiration_sec=token_expiration_sec, **kwargs)

@staticmethod
async def register_service(
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/minos-discovery-kong/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "minos-discovery-kong"
version = "0.7.0.dev2"
version = "0.7.0.dev3"
description = "The minos-kong plugin offer an interface that permit integrate Minos Microservice with Kong API Gateway"
readme = "README.md"
repository = "https://github.com/minos-framework/minos-python"
Expand Down