anchor dict | positive dict | negative dict |
|---|---|---|
{
"audio": "",
"image": "",
"text": "func (m *MockImageAPIClient) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error) {\n\tret := m.ctrl.Call(m, \"ImageCreate\", ctx,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " parentReference, options)\n\tret0, _ := ret[0].(io.ReadCloser)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockImageAPIClient) ImageHistory(ctx context.Context, image string) ([]imagepkg.HistoryResponseItem, error) {\n\tret := m.ctrl.Call(m, \"ImageHistory\", ctx, image)",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tret0, _ := ret[0].([]imagepkg.HistoryResponseItem)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockImageAPIClient) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error) {\n\tret := m.ctrl.Call(m, \"ImageList\", ctx, options)",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tret0, _ := ret[0].([]types.ImageSummary)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockImageAPIClient) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error) {\n\tret := m.ctrl.Call(m, \"ImageLoad\", ctx, input,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " quiet)\n\tret0, _ := ret[0].(types.ImageLoadResponse)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockImageAPIClient) ImageRemove(ctx context.Context, image string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error) {\n\tret := m.ctrl.Call(m, \"ImageRemove\", ctx, image,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " options)\n\tret0, _ := ret[0].([]types.ImageDeleteResponseItem)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockImageAPIClient) ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error) {\n\tret := m.ctrl.Call(m, \"ImageSearch\", ctx, term,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " options)\n\tret0, _ := ret[0].([]registry.SearchResult)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockImageAPIClientMockRecorder) ImageSearch(ctx, term, options interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ImageSearch\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockImageAPIClient)(nil).ImageSearch), ctx, term, options)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockImageAPIClientMockRecorder) ImageSave(ctx, images interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ImageSave\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockImageAPIClient)(nil).ImageSave), ctx, images)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockImageAPIClientMockRecorder) ImagesPrune(ctx, pruneFilter interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ImagesPrune\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockImageAPIClient)(nil).ImagesPrune), ctx, pruneFilter)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewMockNetworkAPIClient(ctrl *gomock.Controller) *MockNetworkAPIClient {\n\tmock := &MockNetworkAPIClient{ctrl:",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ctrl}\n\tmock.recorder = &MockNetworkAPIClientMockRecorder{mock}\n\treturn mock\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " sync,\n\t}\n\n\tcontroller.logger.Log(\"info\", \"setting up event handlers\")\n\n\t// ----- EVENT HANDLERS for HelmRelease resources change ---------\n\tfhrInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{\n\t\tAddFunc: func(new interface{}) {\n... |
{
"audio": "",
"image": "",
"text": "func (mr *MockNetworkAPIClientMockRecorder) NetworkConnect(ctx, networkID, container, config interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " \"NetworkConnect\", reflect.TypeOf((*MockNetworkAPIClient)(nil).NetworkConnect), ctx, networkID, container, config)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockNetworkAPIClientMockRecorder) NetworkCreate(ctx, name, options interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"NetworkCreate\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockNetworkAPIClient)(nil).NetworkCreate), ctx, name, options)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockNetworkAPIClient) NetworkInspect(ctx context.Context, networkID string, verbose bool) (types.NetworkResource, error) {\n\tret := m.ctrl.Call(m, \"NetworkInspect\", ctx, networkID,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " verbose)\n\tret0, _ := ret[0].(types.NetworkResource)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockNetworkAPIClientMockRecorder) NetworkInspect(ctx, networkID, verbose interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " \"NetworkInspect\", reflect.TypeOf((*MockNetworkAPIClient)(nil).NetworkInspect), ctx, networkID, verbose)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockNetworkAPIClientMockRecorder) NetworksPrune(ctx, pruneFilter interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"NetworksPrune\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockNetworkAPIClient)(nil).NetworksPrune), ctx, pruneFilter)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewMockNodeAPIClient(ctrl *gomock.Controller) *MockNodeAPIClient {\n\tmock := &MockNodeAPIClient{ctrl: ctrl}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tmock.recorder = &MockNodeAPIClientMockRecorder{mock}\n\treturn mock\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\tmock := &MockDockerMetadataClient{ctrl: ctrl}\n\tmock.recorder = &MockDockerMetadataClientMockRecorder{mock}\n\treturn mock\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockNodeAPIClient) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error {\n\tret",
"video": ""
} | {
"audio": "",
"image": "",
"text": " := m.ctrl.Call(m, \"NodeRemove\", ctx, nodeID, options)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " (string, string, string, error) {\n\treturn api.SendMessageContext(context.Background(), channelID, MsgOptionUnfurl(timestamp, unfurls), MsgOptionCompose(options...))\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockNodeAPIClientMockRecorder) NodeRemove(ctx, nodeID, options interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " \"NodeRemove\", reflect.TypeOf((*MockNodeAPIClient)(nil).NodeRemove), ctx, nodeID, options)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockNodeAPIClient) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error {\n\tret := m.ctrl.Call(m, \"NodeUpdate\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ctx, nodeID, version, node)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " error {\n\tret := m.ctrl.Call(m, \"RunScript\", scriptName, options)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewMockPluginAPIClient(ctrl *gomock.Controller) *MockPluginAPIClient {\n\tmock := &MockPluginAPIClient{ctrl:",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ctrl}\n\tmock.recorder = &MockPluginAPIClientMockRecorder{mock}\n\treturn mock\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " sync,\n\t}\n\n\tcontroller.logger.Log(\"info\", \"setting up event handlers\")\n\n\t// ----- EVENT HANDLERS for HelmRelease resources change ---------\n\tfhrInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{\n\t\tAddFunc: func(new interface{}) {\n... |
{
"audio": "",
"image": "",
"text": "func (mr *MockPluginAPIClientMockRecorder) PluginList(ctx, filter interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"PluginList\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockPluginAPIClient)(nil).PluginList), ctx, filter)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockPluginAPIClient) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error {\n\tret",
"video": ""
} | {
"audio": "",
"image": "",
"text": " := m.ctrl.Call(m, \"PluginRemove\", ctx, name, options)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " (string, string, string, error) {\n\treturn api.SendMessageContext(context.Background(), channelID, MsgOptionUnfurl(timestamp, unfurls), MsgOptionCompose(options...))\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockPluginAPIClientMockRecorder) PluginRemove(ctx, name, options interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"PluginRemove\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockPluginAPIClient)(nil).PluginRemove), ctx, name, options)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockPluginAPIClient) PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error {\n\tret",
"video": ""
} | {
"audio": "",
"image": "",
"text": " := m.ctrl.Call(m, \"PluginEnable\", ctx, name, options)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " (string, string, string, error) {\n\treturn api.SendMessageContext(context.Background(), channelID, MsgOptionUnfurl(timestamp, unfurls), MsgOptionCompose(options...))\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockPluginAPIClient) PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error {\n\tret",
"video": ""
} | {
"audio": "",
"image": "",
"text": " := m.ctrl.Call(m, \"PluginDisable\", ctx, name, options)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " (string, string, string, error) {\n\treturn api.SendMessageContext(context.Background(), channelID, MsgOptionUnfurl(timestamp, unfurls), MsgOptionCompose(options...))\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockPluginAPIClient) PluginPush(ctx context.Context, name, registryAuth string) (io.ReadCloser, error) {\n\tret := m.ctrl.Call(m, \"PluginPush\", ctx, name,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " registryAuth)\n\tret0, _ := ret[0].(io.ReadCloser)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockPluginAPIClient) PluginSet(ctx context.Context, name string, args",
"video": ""
} | {
"audio": "",
"image": "",
"text": " []string) error {\n\tret := m.ctrl.Call(m, \"PluginSet\", ctx, name, args)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " a.baseToken.token,\n\t\tlifetime: lifetime,\n\t\trefreshCb: func(ctx context.Context, prev *internal.Token) (*internal.Token, error) {\n\t\t\treturn a.baseToken.renewToken(ctx, prev, nil)\n\t\t},\n\t})\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockPluginAPIClient) PluginCreate(ctx context.Context, createContext io.Reader, options",
"video": ""
} | {
"audio": "",
"image": "",
"text": " types.PluginCreateOptions) error {\n\tret := m.ctrl.Call(m, \"PluginCreate\", ctx, createContext, options)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " a.baseToken.token,\n\t\tlifetime: lifetime,\n\t\trefreshCb: func(ctx context.Context, prev *internal.Token) (*internal.Token, error) {\n\t\t\treturn a.baseToken.renewToken(ctx, prev, nil)\n\t\t},\n\t})\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockPluginAPIClientMockRecorder) PluginCreate(ctx, createContext, options interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " \"PluginCreate\", reflect.TypeOf((*MockPluginAPIClient)(nil).PluginCreate), ctx, createContext, options)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewMockServiceAPIClient(ctrl *gomock.Controller) *MockServiceAPIClient {\n\tmock := &MockServiceAPIClient{ctrl:",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ctrl}\n\tmock.recorder = &MockServiceAPIClientMockRecorder{mock}\n\treturn mock\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " sync,\n\t}\n\n\tcontroller.logger.Log(\"info\", \"setting up event handlers\")\n\n\t// ----- EVENT HANDLERS for HelmRelease resources change ---------\n\tfhrInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{\n\t\tAddFunc: func(new interface{}) {\n... |
{
"audio": "",
"image": "",
"text": "func (m *MockServiceAPIClient) ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options types.ServiceCreateOptions) (types.ServiceCreateResponse, error) {\n\tret := m.ctrl.Call(m, \"ServiceCreate\", ctx, service,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " options)\n\tret0, _ := ret[0].(types.ServiceCreateResponse)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockServiceAPIClient) ServiceInspectWithRaw(ctx context.Context, serviceID string, options types.ServiceInspectOptions) (swarm.Service, []byte, error) {\n\tret := m.ctrl.Call(m, \"ServiceInspectWithRaw\", ctx,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " serviceID, options)\n\tret0, _ := ret[0].(swarm.Service)\n\tret1, _ := ret[1].([]byte)\n\tret2, _ := ret[2].(error)\n\treturn ret0, ret1, ret2\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockServiceAPIClientMockRecorder) ServiceList(ctx, options interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ServiceList\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockServiceAPIClient)(nil).ServiceList), ctx, options)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockServiceAPIClient) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error) {\n\tret := m.ctrl.Call(m, \"ServiceUpdate\", ctx,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " serviceID, version, service, options)\n\tret0, _ := ret[0].(types.ServiceUpdateResponse)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockServiceAPIClient) ServiceLogs(ctx context.Context, serviceID string, options types.ContainerLogsOptions) (io.ReadCloser, error) {\n\tret := m.ctrl.Call(m, \"ServiceLogs\", ctx,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " serviceID, options)\n\tret0, _ := ret[0].(io.ReadCloser)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockServiceAPIClient) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) {\n\tret := m.ctrl.Call(m, \"TaskList\", ctx, options)",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tret0, _ := ret[0].([]swarm.Task)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewMockSwarmAPIClient(ctrl *gomock.Controller) *MockSwarmAPIClient {\n\tmock := &MockSwarmAPIClient{ctrl:",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ctrl}\n\tmock.recorder = &MockSwarmAPIClientMockRecorder{mock}\n\treturn mock\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " sync,\n\t}\n\n\tcontroller.logger.Log(\"info\", \"setting up event handlers\")\n\n\t// ----- EVENT HANDLERS for HelmRelease resources change ---------\n\tfhrInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{\n\t\tAddFunc: func(new interface{}) {\n... |
{
"audio": "",
"image": "",
"text": "func (m *MockSwarmAPIClient) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) {\n\tret := m.ctrl.Call(m, \"SwarmInit\", ctx, req)",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tret0, _ := ret[0].(string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockSwarmAPIClientMockRecorder) SwarmInit(ctx, req interface{}) *gomock.Call {",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SwarmInit\", reflect.TypeOf((*MockSwarmAPIClient)(nil).SwarmInit), ctx, req)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " CreateRETSVersioner(retsVersion),\n\t\tGetSessionID: CreateSessionIDer(client.Jar),\n\t}).Request\n\t// 1) apply default headers first (outermost wrapping)\n\theaders := func(ctx context.Context, req *http.Request) (*http.Response, error) {\n\t\treq.Header.Set(UserAgent... |
{
"audio": "",
"image": "",
"text": "func (m *MockSwarmAPIClient) SwarmLeave(ctx context.Context, force bool)",
"video": ""
} | {
"audio": "",
"image": "",
"text": " error {\n\tret := m.ctrl.Call(m, \"SwarmLeave\", ctx, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " a.baseToken.token,\n\t\tlifetime: lifetime,\n\t\trefreshCb: func(ctx context.Context, prev *internal.Token) (*internal.Token, error) {\n\t\t\treturn a.baseToken.renewToken(ctx, prev, nil)\n\t\t},\n\t})\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewMockSystemAPIClient(ctrl *gomock.Controller) *MockSystemAPIClient {\n\tmock := &MockSystemAPIClient{ctrl:",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ctrl}\n\tmock.recorder = &MockSystemAPIClientMockRecorder{mock}\n\treturn mock\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " sync,\n\t}\n\n\tcontroller.logger.Log(\"info\", \"setting up event handlers\")\n\n\t// ----- EVENT HANDLERS for HelmRelease resources change ---------\n\tfhrInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{\n\t\tAddFunc: func(new interface{}) {\n... |
{
"audio": "",
"image": "",
"text": "func (mr *MockSystemAPIClientMockRecorder) Events(ctx, options interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Events\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockSystemAPIClient)(nil).Events), ctx, options)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewMockVolumeAPIClient(ctrl *gomock.Controller) *MockVolumeAPIClient {\n\tmock := &MockVolumeAPIClient{ctrl:",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ctrl}\n\tmock.recorder = &MockVolumeAPIClientMockRecorder{mock}\n\treturn mock\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " sync,\n\t}\n\n\tcontroller.logger.Log(\"info\", \"setting up event handlers\")\n\n\t// ----- EVENT HANDLERS for HelmRelease resources change ---------\n\tfhrInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{\n\t\tAddFunc: func(new interface{}) {\n... |
{
"audio": "",
"image": "",
"text": "func (mr *MockVolumeAPIClientMockRecorder) VolumeCreate(ctx, options interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"VolumeCreate\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockVolumeAPIClient)(nil).VolumeCreate), ctx, options)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockVolumeAPIClient) VolumeInspectWithRaw(ctx context.Context, volumeID string) (types.Volume, []byte, error) {\n\tret := m.ctrl.Call(m, \"VolumeInspectWithRaw\", ctx, volumeID)\n\tret0,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " _ := ret[0].(types.Volume)\n\tret1, _ := ret[1].([]byte)\n\tret2, _ := ret[2].(error)\n\treturn ret0, ret1, ret2\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockVolumeAPIClientMockRecorder) VolumeInspectWithRaw(ctx, volumeID interface{}) *gomock.Call {\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"VolumeInspectWithRaw\", reflect.TypeOf((*MockVolumeAPIClient)(nil).VolumeInspectWithRaw), ctx, volumeID)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\treturn nil, ErrInvalidParams()\n\t}\n\n\tmr.m.RLock()\n\tmd, ok := mr.r[r.Method]\n\tmr.m.RUnlock()\n\tif !ok {\n\t\treturn nil, ErrMethodNotFound()\n\t}\n\n\treturn md.Handler, nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockVolumeAPIClient) VolumeList(ctx context.Context, filter filters.Args) (volume.VolumesListOKBody, error) {\n\tret := m.ctrl.Call(m, \"VolumeList\", ctx, filter)",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tret0, _ := ret[0].(volume.VolumesListOKBody)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockVolumeAPIClientMockRecorder) VolumeList(ctx, filter interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"VolumeList\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockVolumeAPIClient)(nil).VolumeList), ctx, filter)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockVolumeAPIClientMockRecorder) VolumesPrune(ctx, pruneFilter interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"VolumesPrune\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockVolumeAPIClient)(nil).VolumesPrune), ctx, pruneFilter)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewMockSecretAPIClient(ctrl *gomock.Controller) *MockSecretAPIClient {\n\tmock := &MockSecretAPIClient{ctrl:",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ctrl}\n\tmock.recorder = &MockSecretAPIClientMockRecorder{mock}\n\treturn mock\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " sync,\n\t}\n\n\tcontroller.logger.Log(\"info\", \"setting up event handlers\")\n\n\t// ----- EVENT HANDLERS for HelmRelease resources change ---------\n\tfhrInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{\n\t\tAddFunc: func(new interface{}) {\n... |
{
"audio": "",
"image": "",
"text": "func (m *MockSecretAPIClient) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error) {\n\tret := m.ctrl.Call(m, \"SecretList\", ctx, options)",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tret0, _ := ret[0].([]swarm.Secret)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockSecretAPIClientMockRecorder) SecretList(ctx, options interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SecretList\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockSecretAPIClient)(nil).SecretList), ctx, options)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockSecretAPIClient) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error) {\n\tret := m.ctrl.Call(m, \"SecretCreate\", ctx, secret)",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tret0, _ := ret[0].(types.SecretCreateResponse)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockSecretAPIClientMockRecorder) SecretCreate(ctx, secret interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SecretCreate\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockSecretAPIClient)(nil).SecretCreate), ctx, secret)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockSecretAPIClientMockRecorder) SecretRemove(ctx, id interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " \"SecretRemove\", reflect.TypeOf((*MockSecretAPIClient)(nil).SecretRemove), ctx, id)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockSecretAPIClient) SecretInspectWithRaw(ctx context.Context, name string) (swarm.Secret, []byte, error) {\n\tret := m.ctrl.Call(m, \"SecretInspectWithRaw\", ctx, name)\n\tret0,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " _ := ret[0].(swarm.Secret)\n\tret1, _ := ret[1].([]byte)\n\tret2, _ := ret[2].(error)\n\treturn ret0, ret1, ret2\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) error {\n\tret := m.ctrl.Call(m, \"VolumeRemove\", ctx, volumeID, force)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (mr *MockSecretAPIClientMockRecorder) SecretInspectWithRaw(ctx, name interface{}) *gomock.Call {\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SecretInspectWithRaw\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": " reflect.TypeOf((*MockSecretAPIClient)(nil).SecretInspectWithRaw), ctx, name)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ChangeConnectionID\", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockSecretAPIClient) SecretUpdate(ctx context.Context, id string, version swarm.Version,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " secret swarm.SecretSpec) error {\n\tret := m.ctrl.Call(m, \"SecretUpdate\", ctx, id, version, secret)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " a.baseToken.token,\n\t\tlifetime: lifetime,\n\t\trefreshCb: func(ctx context.Context, prev *internal.Token) (*internal.Token, error) {\n\t\t\treturn a.baseToken.renewToken(ctx, prev, nil)\n\t\t},\n\t})\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func New(ctx context.Context, p *env.RemoteParameters, c chan *policy.RuntimeError, r rpcwrapper.RPCClient) ProcessManager {\n\n\tm := &RemoteMonitor{\n\t\tremoteEnforcerTempBuildPath: remoteEnforcerTempBuildPath,\n\t\tremoteEnforcerBuildName: remoteEnforcerBuildName,\n\t\... | {
"audio": "",
"image": "",
"text": "\t\tlogLevel: p.LogLevel,\n\t\tlogFormat: p.LogFormat,\n\t\tcompressedTags: p.CompressedTags,\n\t\truntimeErrorChannel: c,\n\t\trpc: r,\n\t}\n\n\tgo m.collectChildExitStatus(ctx)\n\n\treturn m\n}... | {
"audio": "",
"image": "",
"text": "\n\t\tp.Event = pipe.Event\n\t} else {\n\t\tp.Err = make(chan error)\n\t\tp.Event = make(chan events.Event, 10) // buffer the event channel\n\t}\n\n\treturn p\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (p *RemoteMonitor) KillRemoteEnforcer(contextID string, force bool) error {\n\n\tp.Lock()\n\ts, err := p.activeProcesses.Get(contextID)\n\tif err != nil {\n\t\tp.Unlock()\n\t\treturn fmt.Errorf(\"unable to find process for context: %s\", contextID)\n\t}\n\n\tp.activeProce... | {
"audio": "",
"image": "",
"text": "\t\treturn fmt.Errorf(\"cannot find process for context: %s\", contextID)\n\t}\n\n\treq := &rpcwrapper.Request{\n\t\tPayload: procInfo.process.Pid,\n\t}\n\tresp := &rpcwrapper.Response{}\n\n\tc := make(chan error, 1)\n\tgo func() {\n\t\tc <- p.rpc.RemoteCall(contextID, remotee... | {
"audio": "",
"image": "",
"text": " entire graph\n\t\terr := mdag.FetchGraph(ctx, c, p.dserv)\n\t\tp.lock.Lock()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif p.recursePin.Has(c) {\n\t\t\treturn nil\n\t\t}\n\n\t\tif p.directPin.Has(c) {\n\t\t\tp.directPin.Remove(c)\n\t\t}\n\n\t\tp.recursePin.Add(c)\n\... |
{
"audio": "",
"image": "",
"text": "func (p *RemoteMonitor) collectChildExitStatus(ctx context.Context) {\n\n\tdefer func() {\n\t\tif r := recover(); r != nil {\n\t\t\tzap.L().Error(\"Policy engine has possibly closed the channel\")\n\t\t\treturn\n\t\t}\n\t}()\n\n\tfor {\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t... | {
"audio": "",
"image": "",
"text": "\tif p.runtimeErrorChannel != nil {\n\t\t\t\tif es.exitStatus != nil {\n\t\t\t\t\tzap.L().Error(\"Remote enforcer exited with an error\",\n\t\t\t\t\t\tzap.String(\"nativeContextID\", es.contextID),\n\t\t\t\t\t\tzap.Int(\"pid\", es.process),\n\t\t\t\t\t\tzap.Error(es.exitStatus... | {
"audio": "",
"image": "",
"text": "\t}\n\n\tfor {\n\t\tselect {\n\t\tcase event := <-eventq:\n\t\t\tif !r.matchevent(event) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tswitch event.Action {\n\t\t\tcase \"start\":\n\t\t\t\treturn nil\n\t\t\t}\n\t\tcase <-ctx.Done():\n\t\t\treturn ctx.Err()\n\t\tcase <-r.closed:\n\t\t\... |
{
"audio": "",
"image": "",
"text": "func (p *RemoteMonitor) pollStdOutAndErr(\n\tcmd *exec.Cmd,\n\tcontextID string,\n) (err error) {\n\n\tstdout, err := cmd.StdoutPipe()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tstderr, err := cmd.StderrPipe()\n\tif err != nil",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\t\treturn err\n\t}\n\n\t// Stdout/err processing\n\tgo processIOReader(stdout, contextID)\n\tgo processIOReader(stderr, contextID)\n\n\treturn nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " \"STNORESTART=1\", \"STGUIAPIKEY=\"+APIKey)\n\n\terr := cmd.Start()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tp.cmd = cmd\n\tgo p.eventLoop()\n\tgo p.wait()\n\n\treturn nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (p *RemoteMonitor) getLaunchProcessCmd(remoteEnforcerBuildPath, remoteEnforcerName, arg string) *exec.Cmd {\n\n\tcmdName := filepath.Join(remoteEnforcerBuildPath, remoteEnforcerName)\n\n\tcmdArgs := []string{arg}\n\tzap.L().Debug(\"Enforcer executed\",",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\tzap.String(\"command\", cmdName),\n\t\tzap.Strings(\"args\", cmdArgs),\n\t)\n\n\treturn execCommand(cmdName, cmdArgs...)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tif err := copyLibrariesFiles(l.Uses, l.Libraries, filepath.Join(baseDir, l.Filename),\n\t\t\tfilepath.Join(dir, filepath.Dir(l.Filename)), libRootURLs); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (p *RemoteMonitor) getLaunchProcessEnvVars(\n\tprocMountPoint string,\n\tcontextID string,\n\trandomkeystring string,\n\tstatsServerSecret string,\n\trefPid int,\n\trefNSPath string,\n) []string {\n\n\tnewEnvVars := []string{\n\t\tconstants.EnvMountPoint + \"=\" + procMou... | {
"audio": "",
"image": "",
"text": "\t\tnewEnvVars = append(newEnvVars, constants.EnvCompressedTags+\"=\"+string(p.compressedTags))\n\t}\n\n\tif p.logToConsole {\n\t\tnewEnvVars = append(newEnvVars, constants.EnvLogToConsole+\"=\"+constants.EnvLogToConsoleEnable)\n\t}\n\n\tif p.logWithID {\n\t\tnewEnvVars = appe... | {
"audio": "",
"image": "",
"text": "\n\ttrailingSpacesRE := regexp.MustCompile(\" +$\")\n\tnumTrailingSpaces := len(trailingSpacesRE.FindString(key))\n\tkey = trailingSpacesRE.ReplaceAllString(key, strings.Repeat(\"` \", numTrailingSpaces))\n\n\tvalue = strings.Replace(value, \"`\", \"``\", -1)\n\n\treturn key +... |
{
"audio": "",
"image": "",
"text": "func contextID2SocketPath(contextID string) string {\n\n\tif contextID == \"\" {\n\t\tpanic(\"contextID",
"video": ""
} | {
"audio": "",
"image": "",
"text": " is empty\")\n\t}\n\n\treturn filepath.Join(\"/var/run/\", strings.Replace(contextID, \"/\", \"_\", -1)+\".sock\")\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " v.String != \"\" {\n\t\tenc.String(v.String)\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func processIOReader(fd io.Reader, contextID string) {\n\treader := bufio.NewReader(fd)\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tfor {\n\t\tstr, err := reader.ReadString('\\n')\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tfmt.Print(\"[\" + contextID + \"]:\" + str)\n\t}\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\tcompressReader = &readCloserWrapper{Reader: bzip2.NewReader(file)}\n\t}\n\n\tvar reader *tar.Reader\n\n\tif compressReader == nil {\n\t\treader = tar.NewReader(file)\n\t} else {\n\t\treader = tar.NewReader(compressReader)\n\t}\n\n\treturn &tarReader{\n\t\tfile: ... |
{
"audio": "",
"image": "",
"text": "func New(start, size int) Allocator {\n\ta := &allocator{\n\t\tallocate: make(chan int, size),\n\t}\n\n\tfor i :=",
"video": ""
} | {
"audio": "",
"image": "",
"text": " start; i < (start + size); i++ {\n\t\ta.allocate <- i\n\t}\n\n\treturn a\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\t\ta.addrNew[i] = make(map[string]*KnownAddress)\n\t}\n\tfor i := range a.addrTried {\n\t\ta.addrTried[i] = list.New()\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (p *allocator) Release(item string) {\n\n\t// Do not release when the channel is full. These can happen when we resync\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t// stopped containers.\n\tif len(p.allocate) == cap(p.allocate) {\n\t\treturn\n\t}\n\n\tintItem, err := strconv.Atoi(item)\n\tif err != nil {\n\t\treturn\n\t}\n\tp.allocate <- intItem\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\t\tch <- err\n\t\tclient.wg.Done()\n\t\treturn\n\t}\n\n\tif packet.Release == \"\" {\n\t\tpacket.Release = release\n\t}\n\n\tif packet.Environment == \"\" {\n\t\tpacket.Environment = environment\n\t}\n\n\toutgoingPacket := &outgoingPacket{packet, ch}\n\n\t// Lazily start ... |
{
"audio": "",
"image": "",
"text": "func (p *allocator) ReleaseInt(item int) {\n\tif len(p.allocate) == cap(p.allocate) || item",
"video": ""
} | {
"audio": "",
"image": "",
"text": " == 0 {\n\t\treturn\n\t}\n\n\tp.allocate <- item\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t// stopped containers.\n\tif len(p.allocate) == cap(p.allocate) {\n\t\treturn\n\t}\n\n\tintItem, err := strconv.Atoi(item)\n\tif err != nil {\n\t\treturn\n\t}\n\tp.allocate <- intItem\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (l *LinuxMonitor) Resync(ctx context.Context)",
"video": ""
} | {
"audio": "",
"image": "",
"text": " error {\n\treturn l.proc.Resync(ctx, nil)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " func(ctx context.Context) error {\n\t\treturn UpdateTenant(ctx, config)\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *collectorImpl) Count() int {\n\tc.Lock()\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tdefer c.Unlock()\n\n\treturn len(c.Flows)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tret := C.rados_break_lock(\n\t\tioctx.ioctx,\n\t\tc_oid,\n\t\tc_name,\n\t\tc_client,\n\t\tc_cookie)\n\n\tswitch ret {\n\tcase 0:\n\t\treturn int(ret), nil\n\tcase -C.ENOENT:\n\t\treturn int(ret), nil\n\tcase -C.EINVAL: // -EINVAL\n\t\treturn int(ret), nil\n\tdefault:\n\t\t... |
{
"audio": "",
"image": "",
"text": "func (c *collectorImpl) GetAllRecords() map[string]*collector.FlowRecord {\n\tc.Lock()\n\tdefer c.Unlock()\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tif len(c.Flows) == 0 {\n\t\treturn nil\n\t}\n\n\tretval := c.Flows\n\tc.Flows = make(map[string]*collector.FlowRecord)\n\treturn retval\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tc.lock.Lock()\n\tdefer c.lock.Unlock()\n\treturn c.err\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *collectorImpl) GetUserRecords() map[string]*collector.UserRecord {\n\tc.Lock()\n\tdefer c.Unlock()\n\n\tif len(c.Users) == 0 {\n\t\treturn nil\n\t}\n\n\tretval :=",
"video": ""
} | {
"audio": "",
"image": "",
"text": " c.Users\n\tc.Users = map[string]*collector.UserRecord{}\n\treturn retval\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tc.lock.Lock()\n\tdefer c.lock.Unlock()\n\treturn c.err\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *collectorImpl) FlushUserCache() {\n\tc.Lock()\n\tdefer c.Unlock()\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\tc.ProcessedUsers = map[string]bool{}\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tc.lock.Lock()\n\tdefer c.lock.Unlock()\n\treturn c.err\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *collectorImpl) GetAllDataPathPacketRecords() []*collector.PacketReport {\n\tc.Lock()\n\tdefer c.Unlock()\n\n\trecord := c.DatapathPacketReports\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tc.DatapathPacketReports = []*collector.PacketReport{}\n\treturn record\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tc.lock.Lock()\n\tdefer c.lock.Unlock()\n\treturn c.err\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (r *cacheRegistry) Add(c *Cache) {\n\tr.Lock()\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tdefer r.Unlock()\n\n\tr.items[c.name] = c\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) (Client, error)) {\n\tr.clientMu.Lock()\n\tdefer r.clientMu.Unlock()\n\n\tr.clientFuncs[stream] = f\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (r *cacheRegistry) ToString() string {\n\tr.Lock()\n\tdefer r.Unlock()\n\n\tbuffer := fmt.Sprintf(\"Cache Registry: %d\\n\", len(r.items))\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tbuffer += fmt.Sprintf(\" %32s : %s\\n\\n\", \"Cache Name\", \"max/curr\")\n\tfor k, c := range r.items {\n\t\tbuffer += fmt.Sprintf(\" %32s : %s\\n\", k, c.ToString())\n\t}\n\treturn buffer\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " bool) (Client, error)) {\n\tr.clientMu.Lock()\n\tdefer r.clientMu.Unlock()\n\n\tr.clientFuncs[stream] = f\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewCacheWithExpiration(name string, lifetime time.Duration) *Cache {\n\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\treturn NewCacheWithExpirationNotifier(name, lifetime, nil)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\treturn time.Duration(c.MaxTimeSec) * time.Second\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewCacheWithExpirationNotifier(name string, lifetime time.Duration, expirer ExpirationNotifier) *Cache {\n\n\tc := &Cache{\n\t\tname: name,\n\t\tdata: ",
"video": ""
} | {
"audio": "",
"image": "",
"text": " make(map[interface{}]entry),\n\t\tlifetime: lifetime,\n\t\texpirer: expirer,\n\t}\n\tc.max = len(c.data)\n\tregistry.Add(c)\n\treturn c\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"couldn't create resource lock: %v\", err)\n\t}\n\n\treturn &leaderelection.LeaderElectionConfig{\n\t\tLock: rl,\n\t\tLeaseDuration: config.LeaseDuration.Duration,\n\t\tRenewDeadline: config.RenewDeadline.Durati... |
{
"audio": "",
"image": "",
"text": "func (c *Cache) ToString() string {\n\tc.Lock()\n\tdefer c.Unlock()\n\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\treturn fmt.Sprintf(\"%d/%d\", c.max, len(c.data))\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tc.lock.Lock()\n\tdefer c.lock.Unlock()\n\treturn c.err\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *Cache) GetReset(u interface{}, duration time.Duration) (interface{}, error) {\n\n\tc.Lock()\n\tdefer c.Unlock()\n\n\tif line, ok := c.data[u]; ok {\n\n\t\tif c.lifetime !=",
"video": ""
} | {
"audio": "",
"image": "",
"text": " -1 && line.timer != nil {\n\t\t\tif duration > 0 {\n\t\t\t\tline.timer.Reset(duration)\n\t\t\t} else {\n\t\t\t\tline.timer.Reset(c.lifetime)\n\t\t\t}\n\t\t}\n\n\t\treturn line.value, nil\n\t}\n\n\treturn nil, errors.New(\"cannot read item: not found\")\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\treturn time.Duration(c.MaxTimeSec) * time.Second\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *Cache) Update(u interface{}, value interface{}) (err error) {\n\n\tvar timer *time.Timer\n\tif c.lifetime != -1 {\n\t\ttimer = time.AfterFunc(c.lifetime, func() {\n\t\t\tif err := c.removeNotify(u, true); err != nil {\n\t\t\t\tzap.L().Warn(\"Failed to remove item\", z... | {
"audio": "",
"image": "",
"text": " c.data[u].timer != nil {\n\t\t\tc.data[u].timer.Stop()\n\t\t}\n\n\t\tc.data[u] = entry{\n\t\t\tvalue: value,\n\t\t\ttimestamp: t,\n\t\t\ttimer: timer,\n\t\t\texpirer: c.expirer,\n\t\t}\n\n\t\treturn nil\n\t}\n\n\treturn errors.New(\"cannot update item: not found\")\... | {
"audio": "",
"image": "",
"text": " item with delay\", zap.String(\"key\", fmt.Sprintf(\"%v\", u)), zap.String(\"delay\", duration.String()))\n\t\t}\n\t})\n\n\tt := time.Now()\n\n\tif c.data[u].timer != nil {\n\t\tc.data[u].timer.Stop()\n\t}\n\n\tc.data[u] = entry{\n\t\tvalue: e.value,\n\t\ttimestamp: t,\n\... |
{
"audio": "",
"image": "",
"text": "func (c *Cache) AddOrUpdate(u interface{}, value interface{}) (updated bool) {\n\n\tvar timer *time.Timer\n\tif c.lifetime != -1 {\n\t\ttimer = time.AfterFunc(c.lifetime, func() {\n\t\t\tif err := c.removeNotify(u, true); err != nil {\n\t\t\t\tzap.L().Warn(\"Failed to remove i... | {
"audio": "",
"image": "",
"text": " c.data[u].timer != nil {\n\t\t\tc.data[u].timer.Stop()\n\t\t}\n\t}\n\n\tc.data[u] = entry{\n\t\tvalue: value,\n\t\ttimestamp: t,\n\t\ttimer: timer,\n\t\texpirer: c.expirer,\n\t}\n\tif len(c.data) > c.max {\n\t\tc.max = len(c.data)\n\t}\n\n\treturn updated\n}",
"vi... | {
"audio": "",
"image": "",
"text": " item with delay\", zap.String(\"key\", fmt.Sprintf(\"%v\", u)), zap.String(\"delay\", duration.String()))\n\t\t}\n\t})\n\n\tt := time.Now()\n\n\tif c.data[u].timer != nil {\n\t\tc.data[u].timer.Stop()\n\t}\n\n\tc.data[u] = entry{\n\t\tvalue: e.value,\n\t\ttimestamp: t,\n\... |
{
"audio": "",
"image": "",
"text": "func (c *Cache) SetTimeOut(u interface{}, timeout time.Duration) (err error) {\n\tc.Lock()\n\tdefer c.Unlock()\n\n\tif _, ok := c.data[u]; !ok",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\t\treturn errors.New(\"item is already deleted\")\n\t}\n\n\tc.data[u].timer.Reset(timeout)\n\n\treturn nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tdefer c.Unlock()\n\n\tfor id := range c.cache {\n\t\tif _, ok := liveContainers[id]; !ok {\n\t\t\tdelete(c.cache, id)\n\t\t}\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *Cache) Get(u interface{}) (i interface{}, err error) {\n\n\tc.Lock()\n\tdefer c.Unlock()\n\n\tif _, ok := c.data[u]; !ok",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\t\treturn nil, errors.New(\"not found\")\n\t}\n\n\treturn c.data[u].value, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tdefer c.Unlock()\n\n\tfor id := range c.cache {\n\t\tif _, ok := liveContainers[id]; !ok {\n\t\t\tdelete(c.cache, id)\n\t\t}\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *Cache) KeyList() []interface{} {\n\tc.Lock()\n\tdefer c.Unlock()\n\n\tlist := []interface{}{}\n\tfor k :=",
"video": ""
} | {
"audio": "",
"image": "",
"text": " range c.data {\n\t\tlist = append(list, k)\n\t}\n\treturn list\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tdefer c.lock.Unlock()\n\tc.service = k\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *Cache) removeNotify(u interface{}, notify bool) (err error) {\n\n\tc.Lock()\n\tdefer c.Unlock()\n\n\tval, ok := c.data[u]\n\tif !ok {\n\t\treturn errors.New(\"not found\")\n\t}\n\n\tif val.timer != nil {\n\t\tval.timer.Stop()",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t}\n\n\tif notify && val.expirer != nil {\n\t\tval.expirer(c, u, val.value)\n\t}\n\n\tdelete(c.data, u)\n\n\treturn nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " item with delay\", zap.String(\"key\", fmt.Sprintf(\"%v\", u)), zap.String(\"delay\", duration.String()))\n\t\t}\n\t})\n\n\tt := time.Now()\n\n\tif c.data[u].timer != nil {\n\t\tc.data[u].timer.Stop()\n\t}\n\n\tc.data[u] = entry{\n\t\tvalue: e.value,\n\t\ttimestamp: t,\n\... |
{
"audio": "",
"image": "",
"text": "func (c *Cache) Remove(u interface{}) (err error) {\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\treturn c.removeNotify(u, false)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " func(_ *Client, c *RemoteContext) error {\n\t\tc.Snapshotter = snapshotterName\n\t\treturn nil\n\t}\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *Cache) RemoveWithDelay(u interface{}, duration time.Duration) error {\n\tif duration == -1 {\n\t\treturn c.Remove(u)\n\t}\n\n\tc.Lock()\n\tdefer c.Unlock()\n\n\te, ok := c.data[u]\n\n\tif !ok {\n\t\treturn errors.New(\"cannot remove item with delay: not found\")\n\t}\... | {
"audio": "",
"image": "",
"text": " item with delay\", zap.String(\"key\", fmt.Sprintf(\"%v\", u)), zap.String(\"delay\", duration.String()))\n\t\t}\n\t})\n\n\tt := time.Now()\n\n\tif c.data[u].timer != nil {\n\t\tc.data[u].timer.Stop()\n\t}\n\n\tc.data[u] = entry{\n\t\tvalue: e.value,\n\t\ttimestamp: t,\n\... | {
"audio": "",
"image": "",
"text": " {\n\treturn time.Duration(c.MaxTimeSec) * time.Second\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *Cache) SizeOf() int {\n\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tc.Lock()\n\tdefer c.Unlock()\n\n\treturn len(c.data)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\t\tsLen: C.CK_ULONG(saltLength),\n\t}\n\treturn C.GoBytes(unsafe.Pointer(&p), C.int(unsafe.Sizeof(p)))\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (c *Cache) LockedModify(u interface{}, add func(a, b interface{}) interface{}, increment interface{}) (interface{}, error) {\n\n\tvar timer *time.Timer\n\tif c.lifetime != -1 {\n\t\ttimer = time.AfterFunc(c.lifetime, func() {\n\t\t\tif err := c.removeNotify(u, true); err ... | {
"audio": "",
"image": "",
"text": " ok := c.data[u]\n\tif !ok {\n\t\treturn nil, errors.New(\"not found\")\n\t}\n\n\tif e.timer != nil {\n\t\te.timer.Stop()\n\t}\n\n\te.value = add(e.value, increment)\n\te.timer = timer\n\te.timestamp = t\n\te.expirer = c.expirer\n\n\tc.data[u] = e\n\n\treturn e.value, nil\n\n}... | {
"audio": "",
"image": "",
"text": " item with delay\", zap.String(\"key\", fmt.Sprintf(\"%v\", u)), zap.String(\"delay\", duration.String()))\n\t\t}\n\t})\n\n\tt := time.Now()\n\n\tif c.data[u].timer != nil {\n\t\tc.data[u].timer.Stop()\n\t}\n\n\tc.data[u] = entry{\n\t\tvalue: e.value,\n\t\ttimestamp: t,\n\... |
{
"audio": "",
"image": "",
"text": "func NewMockTriremeController(ctrl *gomock.Controller) *MockTriremeController {\n\tmock := &MockTriremeController{ctrl:",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ctrl}\n\tmock.recorder = &MockTriremeControllerMockRecorder{mock}\n\treturn mock\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " sync,\n\t}\n\n\tcontroller.logger.Log(\"info\", \"setting up event handlers\")\n\n\t// ----- EVENT HANDLERS for HelmRelease resources change ---------\n\tfhrInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{\n\t\tAddFunc: func(new interface{}) {\n... |
{
"audio": "",
"image": "",
"text": "func (m *MockTriremeController) UpdateSecrets(secrets secrets.Secrets)",
"video": ""
} | {
"audio": "",
"image": "",
"text": " error {\n\tret := m.ctrl.Call(m, \"UpdateSecrets\", secrets)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\treturn s.coreClientSet.Secrets(s.namespace)\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewMockDebugInfo(ctrl *gomock.Controller) *MockDebugInfo {\n\tmock := &MockDebugInfo{ctrl: ctrl}\n",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\tmock.recorder = &MockDebugInfoMockRecorder{mock}\n\treturn mock\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " {\n\tmock := &MockDockerMetadataClient{ctrl: ctrl}\n\tmock.recorder = &MockDockerMetadataClientMockRecorder{mock}\n\treturn mock\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (m *MockDebugInfo) EnableDatapathPacketTracing(contextID string, direction packettracing.TracingDirection, interval time.Duration, putype common.PUType) error {\n\tret := m.ctrl.Call(m,",
"video": ""
} | {
"audio": "",
"image": "",
"text": " \"EnableDatapathPacketTracing\", contextID, direction, interval, putype)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " error {\n\tret := m.ctrl.Call(m, \"Detach\", arg0, arg1)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewVerifierFromFile(jwtcertPath string, redirectURI string, redirectOnFail, redirectOnNoToken bool) (*PKIJWTVerifier, error) {\n\tjwtCertPEM, err := ioutil.ReadFile(jwtcertPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to read JWT signing certificates or pu... | {
"audio": "",
"image": "",
"text": " keys from file: %s\", err)\n\t}\n\treturn NewVerifierFromPEM(jwtCertPEM, redirectURI, redirectOnFail, redirectOnNoToken)\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " ioutil.ReadFile(filePath)\n\tif err != nil {\n\t\treturn nil,\n\t\t\tfmt.Errorf(\"Could not read file %s (Error: %s)\",\n\t\t\t\tfilePath, err.Error())\n\t}\n\n\treturn fileContentsArray, nil\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func NewVerifierFromPEM(jwtCertPEM []byte, redirectURI string, redirectOnFail, redirectOnNoToken bool) (*PKIJWTVerifier, error) {\n\tkeys, err := parsePublicKeysFromPEM(jwtCertPEM)\n\t// pay attention to the return format of parsePublicKeysFromPEM\n\t// when checking for an er... | {
"audio": "",
"image": "",
"text": " != nil {\n\t\treturn nil, fmt.Errorf(\"failed to read JWT signing certificates or public keys from PEM: %s\", err)\n\t}\n\treturn &PKIJWTVerifier{\n\t\tJWTCertPEM: jwtCertPEM,\n\t\tkeys: keys,\n\t\tRedirectURL: redirectURI,\n\t}, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " the state of the charm. So returning an error\n\t\t// here in the \"missing\" case makes less sense than in other\n\t\t// places. We could simply ignore any error that surfaces for\n\t\t// that case. However, returning the error communicates to the\n\t\t// charm author that w... |
{
"audio": "",
"image": "",
"text": "func NewVerifier(v *PKIJWTVerifier) (*PKIJWTVerifier, error) {\n\tif len(v.JWTCertPEM) == 0 {\n\t\treturn v, nil\n\t}\n\tkeys, err := parsePublicKeysFromPEM(v.JWTCertPEM)\n\t// pay attention to the return format of parsePublicKeysFromPEM\n\t// when checking for an error here\n... | {
"audio": "",
"image": "",
"text": " nil && err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse JWT signing certificates or public keys from PEM: %s\", err)\n\t}\n\tv.keys = keys\n\treturn v, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": "\n\t\t\t\tif i == 0 {\n\t\t\t\t\tif v != \"\" { // in first check, only return keys with value\n\t\t\t\t\t\treturn k\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn k\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn \"\"\n}",
"video": ""
} |
{
"audio": "",
"image": "",
"text": "func (j *PKIJWTVerifier) Validate(ctx context.Context, tokenString string) ([]string, bool, string, error) {\n\tif len(tokenString) == 0 {\n\t\treturn []string{}, false, tokenString, fmt.Errorf(\"Empty token\")\n\t}\n\tif len(j.keys) == 0 {\n\t\treturn []string{}, false, token... | {
"audio": "",
"image": "",
"text": "\tif isRSAPublicKey(key) {\n\t\t\t\t\treturn key, nil\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"unsupported signing method '%T'\", token.Method)\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"signing method '%T' and public key type '%T' mismatch\", token.Method, k... | {
"audio": "",
"image": "",
"text": " token.Method.(*jwt.SigningMethodHMAC); !ok {\n\t\t\t\t//TODO: On ne passe jamais à l'intérieur\n\t\t\t\treturn nil, fmt.Errorf(\"Unexpected signing method: %v\", token.Header[\"alg\"])\n\t\t\t}\n\t\t\treturn []byte(cnf.Jwt.Key), nil\n\t\t})\n\t\tif err == nil && token.Valid {... |
{
"audio": "",
"image": "",
"text": "func (j *PKIJWTVerifier) Callback(r *http.Request)",
"video": ""
} | {
"audio": "",
"image": "",
"text": " (string, string, int, error) {\n\treturn \"\", \"\", 0, nil\n}",
"video": ""
} | {
"audio": "",
"image": "",
"text": " func(responseWriter http.ResponseWriter, request *http.Request) {\n\t\thttp.ServeFile(responseWriter, request, filePath)\n\t}\n}",
"video": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.