-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from karimra/healthz-update
update healthz RPCs
- Loading branch information
Showing
30 changed files
with
1,527 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Oops, something went wrong.