Skip to content

Commit

Permalink
Merge pull request #38 from karimra/healthz-update
Browse files Browse the repository at this point in the history
update healthz RPCs
  • Loading branch information
karimra authored Mar 5, 2023
2 parents f74af36 + b1fdf15 commit 318dae8
Show file tree
Hide file tree
Showing 30 changed files with 1,527 additions and 301 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM golang:1.19.5 as builder
ADD . /build
WORKDIR /build
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o gnoic .

FROM alpine

LABEL maintainer="Karim Radhouani <[email protected]>"
LABEL documentation="https://gnoic.kmrd.dev"
LABEL repo="https://github.com/karimra/gnoic"
COPY --from=builder /build/gnoic /app/
ENTRYPOINT [ "/app/gnoic" ]
CMD [ "help" ]
21 changes: 21 additions & 0 deletions api/healthz/acknowledge.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package healthz

import gnoihealthz "github.com/openconfig/gnoi/healthz"

func NewAcknowledgeRequest(opts ...HealthzOption) (*gnoihealthz.AcknowledgeRequest, error) {
m := &gnoihealthz.AcknowledgeRequest{}
err := apply(m, opts...)
if err != nil {
return nil, err
}
return m, nil
}

func NewAcknowledgeResponse(opts ...HealthzOption) (*gnoihealthz.AcknowledgeResponse, error) {
m := &gnoihealthz.AcknowledgeResponse{}
err := apply(m, opts...)
if err != nil {
return nil, err
}
return m, nil
}
21 changes: 21 additions & 0 deletions api/healthz/artifact.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package healthz

import gnoihealthz "github.com/openconfig/gnoi/healthz"

func NewArtifactRequest(opts ...HealthzOption) (*gnoihealthz.ArtifactRequest, error) {
m := &gnoihealthz.ArtifactRequest{}
err := apply(m, opts...)
if err != nil {
return nil, err
}
return m, nil
}

func NewArtifactResponse(opts ...HealthzOption) (*gnoihealthz.ArtifactResponse, error) {
m := &gnoihealthz.ArtifactResponse{}
err := apply(m, opts...)
if err != nil {
return nil, err
}
return m, nil
}
21 changes: 21 additions & 0 deletions api/healthz/check.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package healthz

import gnoihealthz "github.com/openconfig/gnoi/healthz"

func NewCheckRequest(opts ...HealthzOption) (*gnoihealthz.CheckRequest, error) {
m := &gnoihealthz.CheckRequest{}
err := apply(m, opts...)
if err != nil {
return nil, err
}
return m, nil
}

func NewCheckResponse(opts ...HealthzOption) (*gnoihealthz.CheckResponse, error) {
m := &gnoihealthz.CheckResponse{}
err := apply(m, opts...)
if err != nil {
return nil, err
}
return m, nil
}
21 changes: 21 additions & 0 deletions api/healthz/get.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package healthz

import gnoihealthz "github.com/openconfig/gnoi/healthz"

func NewGetRequest(opts ...HealthzOption) (*gnoihealthz.GetRequest, error) {
m := &gnoihealthz.GetRequest{}
err := apply(m, opts...)
if err != nil {
return nil, err
}
return m, nil
}

func NewGetResponse(opts ...HealthzOption) (*gnoihealthz.GetResponse, error) {
m := &gnoihealthz.GetResponse{}
err := apply(m, opts...)
if err != nil {
return nil, err
}
return m, nil
}
21 changes: 21 additions & 0 deletions api/healthz/list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package healthz

import gnoihealthz "github.com/openconfig/gnoi/healthz"

func NewListRequest(opts ...HealthzOption) (*gnoihealthz.ListRequest, error) {
m := &gnoihealthz.ListRequest{}
err := apply(m, opts...)
if err != nil {
return nil, err
}
return m, nil
}

func NewListResponse(opts ...HealthzOption) (*gnoihealthz.ListResponse, error) {
m := &gnoihealthz.ListResponse{}
err := apply(m, opts...)
if err != nil {
return nil, err
}
return m, nil
}
Loading

0 comments on commit 318dae8

Please sign in to comment.