akasar

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SetLogger     func(impl any, logger *slog.Logger) error
	SetAkasarInfo func(impl any, info *Info) error
	FillRefs      func(impl any, get func(t reflect.Type) (any, error)) error
	FillListeners func(impl any, get func(string) (net.Listener, string, error)) error
)

Functions

This section is empty.

Types

type AkasaLet

type AkasaLet interface {
	// GetIface 根据接口类型获取组件的handle
	GetIface(t reflect.Type) (any, error)

	// GetImpl 根据提供的类型获取组件的实现
	GetImpl(t reflect.Type) (any, error)
}

type Info

type Info struct {
	DeploymentID string
}

type RemoteAkasaLet

type RemoteAkasaLet struct {
	// contains filtered or unexported fields
}

func NewRemoteAkasaLet

func NewRemoteAkasaLet(ctx context.Context, regs []*codegen.Registration, bootstrap runtime.Bootstrap, opts RemoteAkasaletOptions) (*RemoteAkasaLet, error)

func (*RemoteAkasaLet) Args

func (a *RemoteAkasaLet) Args() *protos.AkasaletArgs

func (*RemoteAkasaLet) GetHealth

func (*RemoteAkasaLet) GetImpl

func (a *RemoteAkasaLet) GetImpl(t reflect.Type) (any, error)

func (*RemoteAkasaLet) GetLoad

func (*RemoteAkasaLet) GetMetrics

func (*RemoteAkasaLet) GetProfile

func (*RemoteAkasaLet) InitAkasalet

func (*RemoteAkasaLet) UpdateComponents

func (*RemoteAkasaLet) UpdateRoutingInfo

func (a *RemoteAkasaLet) UpdateRoutingInfo(ctx context.Context, req *protos.UpdateRoutingInfoRequest) (reply *protos.UpdateRoutingInfoReply, err error)

func (*RemoteAkasaLet) Wait

func (a *RemoteAkasaLet) Wait() error

type RemoteAkasaletOptions

type RemoteAkasaletOptions struct {
	Fakes         map[reflect.Type]any
	InjectRetries int
}

type SingleAkasalet

type SingleAkasalet struct {
	// contains filtered or unexported fields
}

func NewSingleAkasaLet

func NewSingleAkasaLet(ctx context.Context, regs []*codegen.Registration, opts SingleAkasaletOptions) (*SingleAkasalet, error)

func (*SingleAkasalet) GetIface

func (l *SingleAkasalet) GetIface(t reflect.Type) (any, error)

func (*SingleAkasalet) GetImpl

func (l *SingleAkasalet) GetImpl(t reflect.Type) (any, error)

func (*SingleAkasalet) ServeStatus

func (l *SingleAkasalet) ServeStatus(ctx context.Context) error

type SingleAkasaletOptions

type SingleAkasaletOptions struct {
	ConfigFilename string // config filename
	Config         string //config contents
	Quiet          bool
	Fakes          map[reflect.Type]any
}

Jump to

Keyboard shortcuts

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