yomorun / yomo

🦖 Stateful Serverless Framework for Geo-distributed Edge AI Infra. with function calling support, write once, run on any model.
https://yomo.run
Apache License 2.0
1.66k stars 128 forks source link

feat: version negotiate function can be customized in NewZipper() #698

Closed woorui closed 8 months ago

woorui commented 8 months ago

Description

The new function signature is blow, if vgfn is nil, use default VersionNegotiateFunc.

func NewZipper(
    name string,
    router router.Router, 
    vgfn core.VersionNegotiateFunc,
    meshConfig map[string]config.Downstream,
    options ...ZipperOption,
) (Zipper, error)

The default VersionNegotiateFunc responds with a RejectFrame to the client if version negotiation fails, and with a HandshakeFrame if version negotiation is successful.

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **yomo** | ⬜️ Ignored ([Inspect](https://vercel.com/yomorun/yomo/7ZZYUSNHuLASUioxK6yohikzmFMA)) | [Visit Preview](https://yomo-git-feat-handshake-version-yomorun.vercel.app) | | Jan 8, 2024 8:11am |
codecov[bot] commented 8 months ago

Codecov Report

Attention: 29 lines in your changes are missing coverage. Please review.

Comparison is base (048dd08) 58.22% compared to head (ff0de09) 58.39%.

Files Patch % Lines
core/server.go 75.00% 14 Missing and 5 partials :warning:
pkg/frame-codec/y3codec/connect_to_frame.go 72.72% 4 Missing and 2 partials :warning:
core/version.go 63.63% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #698 +/- ## ========================================== + Coverage 58.22% 58.39% +0.16% ========================================== Files 36 37 +1 Lines 2674 2711 +37 ========================================== + Hits 1557 1583 +26 - Misses 1017 1026 +9 - Partials 100 102 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.