You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Galen Warren (Jira)" <ji...@apache.org> on 2022/02/23 16:53:00 UTC

[jira] [Commented] (FLINK-26340) Add ability in Golang SDK to create new statefun.Context from existing one, but with a new underlying context.Context

    [ https://issues.apache.org/jira/browse/FLINK-26340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17496903#comment-17496903 ] 

Galen Warren commented on FLINK-26340:
--------------------------------------

PR created: [[FLINK-26340][statefun-golang-sdk] Add ability in Golang SDK to create new statefun.Context from existing one, but with a new underlying context.Context by galenwarren · Pull Request #303 · apache/flink-statefun (github.com)|https://github.com/apache/flink-statefun/pull/303]

> Add ability in Golang SDK to create new statefun.Context from existing one, but with a new underlying context.Context
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-26340
>                 URL: https://issues.apache.org/jira/browse/FLINK-26340
>             Project: Flink
>          Issue Type: Improvement
>          Components: Stateful Functions
>    Affects Versions: statefun-3.3.0
>            Reporter: Galen Warren
>            Priority: Minor
>              Labels: pull-request-available
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> In the Golang SDK, statefun.Context embeds the context.Context interface and is implemented by the statefunContext struct, which embeds a context.Context. To support common patterns in Golang related to adding values to context, it would be useful to be able to create a derived statefun.Context that is equivalent to the original in terms of statefun functionality but which wraps a different context.Context.
> The proposal is to add a:
> WithContext(ctx context.Context) statefun.Context
> ... method to the statefun.Context interface and implement it on statefunContext. This method would return the derived statefun context.
> This is a breaking change to statefun.Context, but, given its purpose, we do not expect there to be implementations of this interface outside the Golang SDK. 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)