You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/03/08 01:36:45 UTC

[GitHub] dgrove-oss commented on a change in pull request #3411: refactor KubernetesClient to separate invokerAgent; add forwarding LogStoreProvider

dgrove-oss commented on a change in pull request #3411: refactor KubernetesClient to separate invokerAgent; add forwarding LogStoreProvider
URL: https://github.com/apache/incubator-openwhisk/pull/3411#discussion_r173040613
 
 

 ##########
 File path: core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesContainer.scala
 ##########
 @@ -110,6 +114,23 @@ class KubernetesContainer(protected[core] val id: ContainerId,
 
   private val stringSentinel = DockerContainer.ActivationSentinel.utf8String
 
+  def forwardLogs(sizeLimit: ByteSize,
+                  sentinelledLogs: Boolean,
+                  additionalMetadata: Map[String, JsValue],
+                  augmentedActivation: JsObject)(implicit transid: TransactionId): Future[Unit] = {
+    kubernetes match {
+      case client: KubernetesClientWithInvokerAgent => {
+        client
+          .forwardLogs(this, lastOffset.get(), sizeLimit, sentinelledLogs, additionalMetadata, augmentedActivation)
 
 Review comment:
   I debated two options here.  It also would work to "inline" the forwardLogs code from KubernetesClientWithInvokerAgent here and use the agentCommand method externally.  That would mean that some details of the invokerAgent protocol would leak into KubernetesContainer, but it would reduce the back&forth. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services