service

package
v0.0.0-...-fc7dab2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Method

type Method interface {
	ProtoReflect
	Name() string
	FullName() string
	ServicePolicy() ServicePolicy
	CallPolicy() MethodCallPolicy
}

type MethodCallPolicy

type MethodCallPolicy interface {
	ServiceGlobalOptions
	IsStreamable() bool
	SessionSticky() bool
	NewSession() int
	CloseSession() bool
	RequiredRoles() []string
	Timeout() uint32
}

type ProtoReflect

type ProtoReflect interface {
	WasSet(*protoimpl.ExtensionInfo) bool
}

type Service

type Service interface {
	Name() string
	ShortName() string
	Db() pkg.Db
	OpenDb() error
	Configurator() ServiceConfigurator
	WithConfigurator(ServiceConfigurator)
	ReloadConfig(uint) error
	FetchConfig(uint) (ServiceConfigurator, error)
	Server() grpc.BaseServer
	WithServer(grpc.BaseServer)
	IpcServer() grpc.BaseServer
	WithIpcServer(server grpc.BaseServer)
	Policy() ServicePolicy
	WithPolicy(ServicePolicy)
	InitTask(j job.Job) (job.Init, job.Run, job.Finalize)
}

type ServiceConfigurator

type ServiceConfigurator interface {
	node.Configurator
	Address() net.Addr
}

type ServiceGlobalOptions

type ServiceGlobalOptions interface {
	EnforceEncryption() bool
}

Options that can be specified both in service or method scope. Option value specified in a method scope will override the value specified in the service scope.

type ServiceOptionValue

type ServiceOptionValue interface {
	WasSet() bool
	Value() interface{}
}

type ServicePolicy

type ServicePolicy interface {
	ProtoReflect
	ServiceGlobalOptions
	DefaultPort() uint16
	Ipc_UnixDomainSocket() string
	FindMethodByName(string) (Method, bool)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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