util

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Endpoints

func Endpoints(service micro.Service, regService *registry.Service) ([]*registry.Endpoint, error)

func FindByEndpoint

func FindByEndpoint(service micro.Service, endpoint interface{}) ([]*registry.Service, error)

func GoSafe

func GoSafe(fn func())

GoSafe will run func in goroutine safely, avoid crash from unexpected panic

func ServiceRetryGet

func ServiceRetryGet(service micro.Service, svcName string, attempts uint) (string, error)

Types

type ServiceListResult

type ServiceListResult map[*registry.Service][]*registry.Endpoint

func ListEndpoints

func ListEndpoints(service micro.Service) (ServiceListResult, error)

type WrappedEndpoint

type WrappedEndpoint struct {
	Pre     string
	Handler string
}

Jump to

Keyboard shortcuts

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