election

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Component = &component.Component{
	Dependencies: component.Components{
		election.Component,
		grpc.Component,
	},
	Init: component.StepFunc(func(container container.Container) error {
		return container.Provide(NewService)
	}),
	PreExecute: component.StepFunc(func(container container.Container) error {
		return container.Invoke(func(grpc *grpc.Server, s *Service) {
			service.RegisterElectionServer(grpc.GetGRPC(), s)
		})
	}),
}

Functions

This section is empty.

Types

type Service

type Service struct {
	service.UnimplementedElectionServer
	// contains filtered or unexported fields
}

func NewService

func NewService(election *election.Election) *Service

func (*Service) Election

func (s *Service) Election(_ context.Context, age *model.Age) (*emptypb.Empty, error)

func (*Service) Vote

func (s *Service) Vote(_ context.Context, bulletin *model.Bulletin) (*emptypb.Empty, error)

Jump to

Keyboard shortcuts

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