Skip to content
Discussion options

You must be logged in to vote

Oh, I see. The SSEHandler is not really extensible at the moment.

I think, in your case, having a custom controller (a wrapper over the default one) could do the trick.

Smth like that in the options for the AnyCable runner:

type CustomController {
  upstream node.Controller
}

func NewCustomController(upstream node.Controller) *CustomController {
  return &CustomController{upstream}
}

func (c *CustomController) Authenticate(ctx context.Context, sid string, env *common.SessionEnv) (res, error) {
   res, err := c.upstream.Authencate(ctx context.Context, sid string, env *common.SessionEnv)
   
   // extract ID from res
   someId = extractFromAuthRes(res)
   
   // you can store in the sessi…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mudge
Comment options

@palkan
Comment options

Answer selected by mudge
@mudge
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants