rpc

package
v0.0.0-...-781836f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 38 Imported by: 1

Documentation

Overview

Package rpc contains implemtation of milo RPC services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MiloInternalService

type MiloInternalService struct {
	// GetSettings returns the current setting for milo.
	GetSettings func(c context.Context) (*configpb.Settings, error)

	// GetGitilesClient returns a git client for the given context.
	GetGitilesClient func(c context.Context, host string, as auth.RPCAuthorityKind) (gitiles.GitilesClient, error)

	// GetBuildersClient returns a buildbucket builders service for the given
	// context.
	GetBuildersClient func(c context.Context, host string, as auth.RPCAuthorityKind) (buildbucketpb.BuildersClient, error)
}

MiloInternalService implements milopb.MiloInternal

func (*MiloInternalService) BatchCheckPermissions

BatchCheckPermissions implements milopb.MiloInternal service

func (*MiloInternalService) GetAllVisibleBuilders

func (s *MiloInternalService) GetAllVisibleBuilders(c context.Context, project string, opt ...layered.Option) ([]*buildbucketpb.BuilderID, error)

GetAllVisibleBuilders returns all cached buildbucket builders. If the cache expired, refresh it with Milo's credential.

func (*MiloInternalService) GetProjectCfg

GetProjectCfg implements milopb.MiloInternal service

func (*MiloInternalService) ListBuilders

ListBuilders implements milopb.MiloInternal service

func (*MiloInternalService) ListProjects

ListProjects implements milopb.MiloInternal service

func (*MiloInternalService) QueryBlamelist

QueryBlamelist implements milopb.MiloInternal service

func (*MiloInternalService) QueryBuilderStats

func (s *MiloInternalService) QueryBuilderStats(ctx context.Context, req *milopb.QueryBuilderStatsRequest) (_ *milopb.BuilderStats, err error)

QueryBuilderStats implements milopb.MiloInternal service

func (*MiloInternalService) QueryConsoleSnapshots

QueryConsoleSnapshots implements milopb.MiloInternal service

func (*MiloInternalService) QueryConsoles

QueryConsoles implements milopb.MiloInternal service

func (*MiloInternalService) QueryRecentBuilds

QueryRecentBuilds implements milopb.MiloInternal service

func (*MiloInternalService) UpdateBuilderCache

func (s *MiloInternalService) UpdateBuilderCache(c context.Context) error

UpdateBuilderCache updates the builders cache if the cache TTL falls below builderCacheRefreshThreshold.

type PageSizeLimiter

type PageSizeLimiter struct {
	Max     int32
	Default int32
}

func (*PageSizeLimiter) Adjust

func (psl *PageSizeLimiter) Adjust(pageSize int32) int32

Adjust the requested pageSize according to PageSizeLimiter.Max and PageSizeLimiter.Default as necessary.

Jump to

Keyboard shortcuts

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