Skip to content

Commit

Permalink
feat: Add support for hooks. (#126)
Browse files Browse the repository at this point in the history
Second PR.

This connects hooks to the ldclient.

It does not add the `Ex` methods to any interface, and it does not add
`AddHooks` to any interface.

---------

Co-authored-by: Casey Waldren <[email protected]>
  • Loading branch information
kinyoklion and cwaldren-ld committed Apr 3, 2024
1 parent 7f06147 commit 929ef8b
Show file tree
Hide file tree
Showing 6 changed files with 970 additions and 51 deletions.
9 changes: 9 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package ldclient
import (
ldevents "github.com/launchdarkly/go-sdk-events/v3"
"github.com/launchdarkly/go-server-sdk/v7/interfaces"
"github.com/launchdarkly/go-server-sdk/v7/ldhooks"
"github.com/launchdarkly/go-server-sdk/v7/subsystems"
)

Expand Down Expand Up @@ -188,4 +189,12 @@ type Config struct {
// Application metadata may be used in LaunchDarkly analytics or other product features, but does not
// affect feature flag evaluations.
ApplicationInfo interfaces.ApplicationInfo

// Initial set of hooks for the client.
//
// Hooks provide entrypoints which allow for observation of SDK functions.
//
// LaunchDarkly provides integration packages, and most applications will not
// need to implement their own hooks.
Hooks []ldhooks.Hook
}
Loading

0 comments on commit 929ef8b

Please sign in to comment.