Documentation ¶
Overview ¶
Package rpc contains implemtation of milo RPC services.
Index ¶
- type MiloInternalService
- func (s *MiloInternalService) BatchCheckPermissions(ctx context.Context, req *milopb.BatchCheckPermissionsRequest) (_ *milopb.BatchCheckPermissionsResponse, err error)
- func (s *MiloInternalService) GetAllVisibleBuilders(c context.Context, project string, opt ...layered.Option) ([]*buildbucketpb.BuilderID, error)
- func (s *MiloInternalService) GetProjectCfg(ctx context.Context, req *milopb.GetProjectCfgRequest) (_ *projectconfigpb.Project, err error)
- func (s *MiloInternalService) ListBuilders(ctx context.Context, req *milopb.ListBuildersRequest) (_ *milopb.ListBuildersResponse, err error)
- func (s *MiloInternalService) ListProjects(ctx context.Context, req *milopb.ListProjectsRequest) (_ *milopb.ListProjectsResponse, err error)
- func (s *MiloInternalService) ProxyGitilesLog(ctx context.Context, req *milopb.ProxyGitilesLogRequest) (_ *gitiles.LogResponse, err error)
- func (s *MiloInternalService) QueryBlamelist(ctx context.Context, req *milopb.QueryBlamelistRequest) (_ *milopb.QueryBlamelistResponse, err error)
- func (s *MiloInternalService) QueryBuilderStats(ctx context.Context, req *milopb.QueryBuilderStatsRequest) (_ *milopb.BuilderStats, err error)
- func (s *MiloInternalService) QueryConsoleSnapshots(ctx context.Context, req *milopb.QueryConsoleSnapshotsRequest) (_ *milopb.QueryConsoleSnapshotsResponse, err error)
- func (s *MiloInternalService) QueryConsoles(ctx context.Context, req *milopb.QueryConsolesRequest) (_ *milopb.QueryConsolesResponse, err error)
- func (s *MiloInternalService) QueryRecentBuilds(ctx context.Context, req *milopb.QueryRecentBuildsRequest) (_ *milopb.QueryRecentBuildsResponse, err error)
- func (s *MiloInternalService) UpdateBuilderCache(c context.Context) error
- type PageSizeLimiter
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 ¶
func (s *MiloInternalService) BatchCheckPermissions(ctx context.Context, req *milopb.BatchCheckPermissionsRequest) (_ *milopb.BatchCheckPermissionsResponse, err error)
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 ¶
func (s *MiloInternalService) GetProjectCfg(ctx context.Context, req *milopb.GetProjectCfgRequest) (_ *projectconfigpb.Project, err error)
GetProjectCfg implements milopb.MiloInternal service
func (*MiloInternalService) ListBuilders ¶
func (s *MiloInternalService) ListBuilders(ctx context.Context, req *milopb.ListBuildersRequest) (_ *milopb.ListBuildersResponse, err error)
ListBuilders implements milopb.MiloInternal service
func (*MiloInternalService) ListProjects ¶
func (s *MiloInternalService) ListProjects(ctx context.Context, req *milopb.ListProjectsRequest) (_ *milopb.ListProjectsResponse, err error)
ListProjects implements milopb.MiloInternal service
func (*MiloInternalService) ProxyGitilesLog ¶
func (s *MiloInternalService) ProxyGitilesLog(ctx context.Context, req *milopb.ProxyGitilesLogRequest) (_ *gitiles.LogResponse, err error)
ProxyGitilesLog implements milopb.MiloInternal service
func (*MiloInternalService) QueryBlamelist ¶
func (s *MiloInternalService) QueryBlamelist(ctx context.Context, req *milopb.QueryBlamelistRequest) (_ *milopb.QueryBlamelistResponse, err error)
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 ¶
func (s *MiloInternalService) QueryConsoleSnapshots(ctx context.Context, req *milopb.QueryConsoleSnapshotsRequest) (_ *milopb.QueryConsoleSnapshotsResponse, err error)
QueryConsoleSnapshots implements milopb.MiloInternal service
func (*MiloInternalService) QueryConsoles ¶
func (s *MiloInternalService) QueryConsoles(ctx context.Context, req *milopb.QueryConsolesRequest) (_ *milopb.QueryConsolesResponse, err error)
QueryConsoles implements milopb.MiloInternal service
func (*MiloInternalService) QueryRecentBuilds ¶
func (s *MiloInternalService) QueryRecentBuilds(ctx context.Context, req *milopb.QueryRecentBuildsRequest) (_ *milopb.QueryRecentBuildsResponse, err error)
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 ¶
func (*PageSizeLimiter) Adjust ¶
func (psl *PageSizeLimiter) Adjust(pageSize int32) int32
Adjust the requested pageSize according to PageSizeLimiter.Max and PageSizeLimiter.Default as necessary.