mmfx

package
v0.0.43 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientModule = fx.Provide(
	func(
		setting MatchmakingSettingParams,
		security sfx.SecuritySettingsParams,
	) (out ClientResult, err error) {
		if client, e := NewClient(setting.URL, security); e != nil {
			err = e
		} else {
			out.Client = client
		}
		return
	})
View Source
var MatchmakingSettingModule = fx.Provide(
	func() (out MatchmakingSettingResult, err error) {
		err = out.LoadFromEnv()
		return
	})

Functions

Types

type ClientParams

type ClientParams struct {
	fx.In

	Client matchmaking.MatchServiceClient `name:"MatchServiceClient"`
}

type ClientResult

type ClientResult struct {
	fx.Out

	Client matchmaking.MatchServiceClient `name:"MatchServiceClient"`
}

type MatchmakingSettingParams

type MatchmakingSettingParams struct {
	fx.In

	// Matchmaking service URL
	URL string `name:"matchmakingUrl"`

	// AWS subnets
	AWSVPCSubnets string `name:"awsVPCSubnets"`

	// Open Match Frontend URL
	OMFrontendUrl string `name:"frontendUrl"`
	// Open Match Backend URL
	OMBackendUrl string `name:"backendUrl"`
	// Open Match Function URL
	OMFuncUrl string `name:"funcUrl"`
	// Open Match Function Port
	OMFuncPort int32 `name:"funcPort"`
}

type MatchmakingSettingResult

type MatchmakingSettingResult struct {
	fx.Out

	// AWS subnets
	AWSVPCSubnets string `name:"awsVPCSubnets" envconfig:"AWS_VPC_SUBNETS" default:"subnet-0b1b2c3d4e5f6g7h8"`

	// Matchmaking service URL
	URL string `name:"matchmakingUrl" envconfig:"MATCHMAKING_URL" default:"localhost:8081"`
	// Open Match Frontend URL
	OMFrontendUrl string `name:"frontendUrl" envconfig:"OM_FRONTEND_URL" default:"localhost:50504"`
	// Open Match Backend URL
	OMBackendUrl string `name:"backendUrl" envconfig:"OM_BACKEND_URL" default:"localhost:50505"`

	// Open Match Function URL
	OMFuncUrl string `name:"funcUrl" envconfig:"OM_FUNC_URL" default:"192.168.50.11"`
	// Open Match Function Port
	OMFuncPort int32 `name:"funcPort" envconfig:"OM_FUNC_PORT" default:"8081"`
}

func (*MatchmakingSettingResult) LoadFromEnv

func (g *MatchmakingSettingResult) LoadFromEnv() (err error)

LoadFromEnv load from env

Jump to

Keyboard shortcuts

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