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

feat(client): add GetEndpointHost utility getter #347

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

parkedwards
Copy link
Contributor

@parkedwards parkedwards commented Dec 24, 2024

resolves https://linear.app/prefect/issue/PLA-841/extract-path-suffix-less-api-endpoint-into-webhook-resource
resolves #333

this PR adds an endpointHost (host only, so no prefix) attribute to the PrefectClient, as well as a getter method on the interface. we use this to construct the full webhook endpoint, since the API only stashes the slug portion, and we'll want to expose a fully formed endpoint based on the API that the provider is initialized with

@parkedwards parkedwards changed the title add endpoint host and hook into webhooks feat(client): add GetEndpointHost utility getter Dec 24, 2024
@@ -6,6 +6,8 @@ import "github.com/google/uuid"
//
//nolint:interfacebloat // we'll accept a larger PrefectClient interface
type PrefectClient interface {
GetEndpointHost() string
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: add a comment string that differentiates the client factories from a new category of methods like this one

@parkedwards parkedwards added the maintenance Maintenance work - won't show in release notes label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance work - won't show in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

extract path-suffix-less API endpoint into webhook resource
1 participant