{"modulePath":"github.com/aliyuncontainerservice/node-problem-detector","version":"v0.6.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package problemclient\n\n## Types\n\n```go\ntype Client interface {\n\t// GetConditions get all specifiec conditions of current node.\n\tGetConditions(conditionTypes []v1.NodeConditionType) ([]*v1.NodeCondition, error)\n\t// SetConditions set or update conditions of current node.\n\tSetConditions(conditions []v1.NodeCondition) error\n\t// Eventf reports the event.\n\tEventf(eventType string, source, reason, messageFmt string, args ...interface{})\n}\n```\nClient is the interface of problem client\n\n```go\nfunc NewClientOrDie(npdo *options.NodeProblemDetectorOptions) Client\n```\nNewClientOrDie creates a new problem client, panics if error occurs.\n\n```go\ntype FakeProblemClient struct {\n\tsync.Mutex\n\t// contains filtered or unexported fields\n}\n```\nFakeProblemClient is a fake problem client for debug.\n\n```go\nfunc NewFakeProblemClient() *FakeProblemClient\n```\nNewFakeProblemClient creates a new fake problem client.\n\n```go\nfunc (f *FakeProblemClient) AssertConditions(expected []v1.NodeCondition) error\n```\nAssertConditions asserts that the internal conditions in fake problem client should match the expected conditions.\n\n```go\nfunc (f *FakeProblemClient) Eventf(eventType string, source, reason, messageFmt string, args ...interface{})\n```\nEventf does nothing now.\n\n```go\nfunc (f *FakeProblemClient) GetConditions(types []v1.NodeConditionType) ([]*v1.NodeCondition, error)\n```\nGetConditions is a fake mimic of GetConditions, it returns the conditions cached internally.\n\n```go\nfunc (f *FakeProblemClient) InjectError(fun string, err error)\n```\nInjectError injects error to specific function.\n\n```go\nfunc (f *FakeProblemClient) SetConditions(conditions []v1.NodeCondition) error\n```\nSetConditions is a fake mimic of SetConditions, it only update the internal condition cache.\n\n","path":"github.com/aliyuncontainerservice/node-problem-detector/pkg/problemclient","name":"problemclient","synopsis":"","isRedistributable":true}
