Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEmptyConfig = errors.New("service config is empty, please provide a valid config")
)
Functions ¶
This section is empty.
Types ¶
type InitOption ¶
type InitOption func(*Service)
InitOption defines the signature for functional options.
func WithConfig ¶
func WithConfig(config matchmakingconfig.Config) InitOption
WithConfig overrides the default configuration.
func WithLogger ¶
func WithLogger(logger zerolog.Logger) InitOption
WithLogger overrides the default logger.
func WithVersion ¶
func WithVersion(version string) InitOption
WithVersion overrides the default version.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service defines the dependencies that can be overridden when initializing a new matchmaking service.
func MustInitService ¶
func MustInitService(ctx context.Context, opts ...InitOption) *Service
MustInitService initializes a new matchmaking service with the provided options. If an error occurs during initialization, the service will log the error and exit.
func NewService ¶
func NewService(opts ...InitOption) (*Service, error)
NewService creates a new matchmaking service with the provided options.
Click to show internal directories.
Click to hide internal directories.