Package rpc contains rpc service implementation.



    View Source
    const (
    	TagNew tagValidationMode = iota
    View Source
    const (
    	// BuildTokenKey is the key of the gRPC request header where the auth token should be
    	// specified.
    	// It's used to authenticate build messages, such as UpdateBuild request,
    	BuildTokenKey = "x-build-token"


    This section is empty.


    func NewBuilders

    func NewBuilders() pb.BuildersServer

      NewBuilders returns a new pb.BuildersServer.

      func NewBuilds

      func NewBuilds() pb.BuildsServer

        NewBuilds returns a new pb.BuildsServer.

        func WithTrafficSplit

        func WithTrafficSplit(c context.Context, pct int) context.Context

          WithTrafficSplit returns a new context with the given traffic split.


          type Builders

          type Builders struct{}

            Builders implements pb.BuildersServer.

            func (*Builders) GetBuilder

            func (*Builders) GetBuilder(ctx context.Context, req *pb.GetBuilderRequest) (*pb.BuilderItem, error)

              GetBuilder handles a request to retrieve a builder. Implements pb.BuildersServer.

              func (*Builders) ListBuilders

                ListBuilders handles a request to retrieve builders. Implements pb.BuildersServer.

                type Builds

                type Builds struct {
                	// contains filtered or unexported fields

                  Builds implements pb.BuildsServer.

                  func (*Builds) Batch

                  func (b *Builds) Batch(ctx context.Context, req *pb.BatchRequest) (*pb.BatchResponse, error)

                    Batch handles a batch request. Implements pb.BuildsServer.

                    func (*Builds) CancelBuild

                    func (*Builds) CancelBuild(ctx context.Context, req *pb.CancelBuildRequest) (*pb.Build, error)

                      CancelBuild handles a request to cancel a build. Implements pb.BuildsServer.

                      func (*Builds) GetBuild

                      func (*Builds) GetBuild(ctx context.Context, req *pb.GetBuildRequest) (*pb.Build, error)

                        GetBuild handles a request to retrieve a build. Implements pb.BuildsServer.

                        func (*Builds) ScheduleBuild

                        func (*Builds) ScheduleBuild(ctx context.Context, req *pb.ScheduleBuildRequest) (*pb.Build, error)

                          ScheduleBuild handles a request to schedule a build. Implements pb.BuildsServer.

                          func (*Builds) SearchBuilds

                            SearchBuilds handles a request to search for builds. Implements pb.BuildsServer.

                            func (*Builds) UpdateBuild

                            func (*Builds) UpdateBuild(ctx context.Context, req *pb.UpdateBuildRequest) (*pb.Build, error)

                              UpdateBuild handles a request to update a build. Implements pb.UpdateBuild.