8000 migrate Kinesis to ASF by alexrashed · Pull Request #6166 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

migrate Kinesis to ASF #6166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Aug 30, 2022
Merged
Changes from 1 commit
Commits
File filter 8000

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
Prev Previous commit
Next Next commit
use _server managed by kinesis_starter
  • Loading branch information
alexrashed committed Aug 30, 2022
commit 7d356f70756737890440803bd611c5e1ae2c4999
11 changes: 4 additions & 7 deletions localstack/services/kinesis/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from random import random
from typing import Dict, List, Set

import localstack.services.kinesis.kinesis_starter as starter
from localstack import config
from localstack.aws.api import RequestContext
from localstack.aws.api.kinesis import (
Expand Down Expand Up @@ -46,7 +47,6 @@
)
from localstack.constants import LOCALHOST
from localstack.services.generic_proxy import RegionBackend
from localstack.services.kinesis.kinesis_starter import check_kinesis, start_kinesis
from localstack.services.plugins import ServiceLifecycleHook
from localstack.utils.aws import aws_stack

Expand Down Expand Up @@ -83,16 +83,13 @@ def find_consumer(consumer_arn="", consumer_name="", stream_arn=""):


class KinesisProvider(KinesisApi, ServiceLifecycleHook):
def __init__(self):
self._server = None

def on_before_start(self):
self._server = start_kinesis()
check_kinesis()
starter.start_kinesis()
starter.check_kinesis()

def get_forward_url(self):
"""Return the URL of the backend Kinesis server to forward requests to"""
return f"http://{LOCALHOST}:{self._server.port}"
return f"http://{LOCALHOST}:{starter._server.port}"

def subscribe_to_shard(
self,
Expand Down
0