async/

directory
v0.0.0-...-c107da6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2020 License: Apache-2.0

README

Use Async Feature

Implement this interface

//AsyncCallbackService callback interface for async
type AsyncCallbackService interface {
	CallBack(response CallbackResponse) // callback
}

like this

type UserProvider struct {
	GetUser func(ctx context.Context, req []interface{}, rsp *User) error
}

func (u *UserProvider) CallBack(res common.CallbackResponse) {
	fmt.Println("CallBack res:",res)
}

Dubbogo will run Async logic once network request finished.

Directories

Path Synopsis
go-client
app
go-server
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL