sjwiesman commented on a change in pull request #245: URL: https://github.com/apache/flink-statefun/pull/245#discussion_r678477930
########## File path: statefun-flink/statefun-flink-datastream/src/main/java/org/apache/flink/statefun/flink/datastream/Endpoint.java ########## @@ -0,0 +1,163 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.statefun.flink.datastream; + +import java.time.Duration; +import java.util.Objects; +import org.apache.flink.annotation.Internal; +import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode; +import org.apache.flink.statefun.flink.core.httpfn.DefaultHttpRequestReplyClientSpec; +import org.apache.flink.statefun.flink.core.httpfn.HttpFunctionEndpointSpec; +import org.apache.flink.statefun.flink.core.httpfn.TransportClientConstants; +import org.apache.flink.statefun.flink.core.jsonmodule.FunctionEndpointSpec; +import org.apache.flink.statefun.flink.core.jsonmodule.FunctionEndpointSpec.Target; +import org.apache.flink.statefun.flink.core.jsonmodule.FunctionEndpointSpec.UrlPathTemplate; +import org.apache.flink.statefun.sdk.FunctionType; +import org.apache.flink.statefun.sdk.TypeName; + +/** + * Specifies an endpoint for connecting to a remote function. This spec corresponds to the {@code + * endpoints} section of the {@code module.yaml} configuration file.The specification correlates the + * logical typename of a function to a physical endpoints. + * + * <p>The {@code functions} parameter of the Endpoint is the {@link TypeName} of the logical + * Stateful Functions. This parameter can points towards a fully qualified typename - {@literal + * '<namespace>/<name>'} or contain a wildcard in the name position - {@literal '<namespace>/*'}. + * Wildcard endpoints will match all functions under the given namespace. + * + * <p>The {@code urlPathTemplate} parameter is the physical URL under which the functions are + * available. Path templates may contain template parameters that are filled in based on the + * functions specific type. Template parameterization works well with load balancers and service + * gateways. + * + * <p>For example, a message sent to the typename {@literal 'com.example/greeter'} will be routed to + * {@literal 'http://bar.foo.com/greeter'}. + * + * <p>{@code Endpoint.withSpec("example/*", "https://endpoints/{function.name}"}</pre> + */ +public class Endpoint { Review comment: I deprecated RemoteFunctionBuilder and replaced it with Endpoint mostly to align naming -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
