Skip to content
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

chore: Remove Discovery #104

Merged
merged 4 commits into from
Dec 18, 2024
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 akka-javasdk-maven/akka-javasdk-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<!-- These are dependent on runtime environment and cannot be customized by users -->
<maven.compiler.release>21</maven.compiler.release>
<kalix-runtime.version>1.3.0-4b5500c-11-087e60dd-SNAPSHOT</kalix-runtime.version>
<kalix-runtime.version>1.3.0-f7f21f858</kalix-runtime.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<skip.docker>false</skip.docker>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,15 +446,6 @@ class AnySupport(
})
.get

def resolveServiceDescriptor(
serviceDescriptor: Descriptors.ServiceDescriptor): Map[String, ResolvedServiceMethod[_, _]] =
serviceDescriptor.getMethods.asScala.map { method =>
method.getName -> ResolvedServiceMethod(
method,
resolveTypeDescriptor(method.getInputType),
resolveTypeDescriptor(method.getOutputType))
}.toMap

private def resolveTypeUrl(typeName: String): Option[ResolvedType[_]] =
allTypes.get(typeName).map(resolveTypeDescriptor)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ package akka.javasdk.impl
import akka.annotation.InternalApi
import akka.javasdk.impl.reflection.KalixMethod
import akka.javasdk.impl.serialization.JsonSerializer
import com.google.protobuf.Descriptors

/**
* The component descriptor is both used for generating the protobuf service descriptor to communicate the service type
* and methods etc. to the runtime and for the reflective routers routing incoming calls to the right method of the user
* The component descriptor is used the reflective routers routing incoming calls to the right method of the user
* component class.
*
* INTERNAL API
Expand All @@ -30,18 +28,13 @@ private[impl] object ComponentDescriptor {
(method.serviceMethod.methodName.capitalize, method.toCommandHandler(serializer))
}.toMap

new ComponentDescriptor(null, null, methods, null, null)
new ComponentDescriptor(methods)

}

def apply(methods: Map[String, CommandHandler]): ComponentDescriptor = {
new ComponentDescriptor(null, null, methods, null, null)
new ComponentDescriptor(methods)
}
}

private[akka] final case class ComponentDescriptor private (
serviceName: String,
packageName: String,
commandHandlers: Map[String, CommandHandler],
serviceDescriptor: Descriptors.ServiceDescriptor,
fileDescriptor: Descriptors.FileDescriptor)
private[akka] final case class ComponentDescriptor private (commandHandlers: Map[String, CommandHandler])
168 changes: 0 additions & 168 deletions akka-javasdk/src/main/scala/akka/javasdk/impl/DiscoveryImpl.scala

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ package akka.javasdk.impl
import akka.annotation.InternalApi
import akka.javasdk.eventsourcedentity.CommandContext
import akka.javasdk.keyvalueentity
import kalix.protocol.entity.Command
import kalix.protocol.event_sourced_entity.EventSourcedInit
import kalix.protocol.value_entity.ValueEntityInit

/**
* INTERNAL API
Expand All @@ -30,12 +27,6 @@ private[javasdk] object EntityExceptions {
def apply(message: String, cause: Option[Throwable]): EntityException =
EntityException(entityId = "", commandName = "", message, cause)

def apply(command: Command, message: String): EntityException =
EntityException(command.entityId, command.name, message, None)

def apply(command: Command, message: String, cause: Option[Throwable]): EntityException =
EntityException(command.entityId, command.name, message, cause)

def apply(context: keyvalueentity.CommandContext, message: String): EntityException =
EntityException(context.entityId, context.commandName, message, None)

Expand All @@ -49,22 +40,4 @@ private[javasdk] object EntityExceptions {
EntityException(context.entityId, context.commandName, message, cause)
}

object ProtocolException {
def apply(message: String): EntityException =
EntityException(entityId = "", commandName = "", "Protocol error: " + message, None)

def apply(command: Command, message: String): EntityException =
EntityException(command.entityId, command.name, "Protocol error: " + message, None)

def apply(entityId: String, message: String): EntityException =
EntityException(entityId, commandName = "", "Protocol error: " + message, None)

def apply(init: ValueEntityInit, message: String): EntityException =
ProtocolException(init.entityId, message)

def apply(init: EventSourcedInit, message: String): EntityException =
ProtocolException(init.entityId, message)

}

}

This file was deleted.

Loading
Loading