with DC/OS 1.9 release all system and container logs will go to sd journal on each host. This PR adds dcos-log support to CLI. Before using newest API , the CLI will try to get the cosmos capability "LOGGING". If the cluster supports dcos-log, it will use it. If the requests fails or dcos-log is missing the LOGGING capability, we will default to mesos files API.
20 lines
561 B
Python
20 lines
561 B
Python
from sseclient import SSEClient
|
|
|
|
from . import http
|
|
|
|
|
|
def get(url, **kwargs):
|
|
""" Make a get request to streaming endpoint which
|
|
implements SSE (Server sent events). The parameter session=http
|
|
will ensure we are using `dcos.http` module with all required auth
|
|
headers.
|
|
|
|
:param url: server sent events streaming URL
|
|
:type url: str
|
|
:param kwargs: arbitrary params for requests
|
|
:type kwargs: dict
|
|
:return: instance of sseclient.SSEClient
|
|
:rtype: sseclient.SSEClient
|
|
"""
|
|
return SSEClient(url, session=http, **kwargs)
|